很奇怪的一个问题
为提高效率,提问时请提供以下信息,问题描述清晰可优先响应。
【GBase版本】:8s
【操作系统】:和操作系统无关
【CPU】:和cpu无关
【问题描述】*:
这是表结构:
create table base_role ( id serial8 not null, name varchar(1020), content text, menu_ids text, duty_id bigint default 0, paper_day_id bigint default 0, paper_week_id bigint default 0, paper_month_id bigint default 0, paper_four_id bigint default 0, paper_year_id bigint default 0, create_time datetime year to second default CURRENT year to fraction(5), update_time datetime year to second default CURRENT year to fraction(5), delete_time datetime year to second, constraint id_base_role primary key (id) );
这是写入数据:
INSERT INTO 库名.base_role (name,content,menu_ids,duty_id,paper_day_id,paper_week_id,paper_month_id,paper_four_id,paper_year_id,create_time,update_time,delete_time) VALUES
('测试名称','测试描述','94',253,258,259,260,261,262,'2025-03-13 18:15:06','2025-03-13 20:56:04','2025-03-13 20:56:05'),
('11','22','97',253,258,259,260,261,262,'2025-03-13 18:52:28','2025-03-13 20:55:41','2025-03-13 20:55:41'),
('111','222','98-1',253,258,259,260,261,262,'2025-03-13 18:54:28','2025-03-13 20:55:41','2025-03-13 20:55:41'),
('aaa','bbb2dasd','98-1,97',253,258,259,260,261,262,'2025-03-13 18:55:46','2025-03-13 20:54:50','2025-03-13 20:54:50'),
('1','','800,803,804,805',306,311,312,313,314,315,'2025-03-17 20:57:15','2025-03-17 20:57:45','2025-03-17 20:57:46'),
('aa','','101-1,1400',301,402,403,404,405,406,'2025-03-10 15:22:58','2025-03-22 14:42:42',NULL),
('','','104-1,1400',301,402,403,404,405,406,'2025-03-10 15:23:06','2025-03-25 19:42:50',NULL),
('cc','','104-1,104-2,1400',10000,402,403,404,405,406,'2025-03-10 15:23:13','2025-03-31 20:25:24',NULL),
('成员','存储阿萨德撒的','30,1403',10000,402,403,404,405,406,'2025-03-10 20:55:00','2025-03-31 21:54:54',NULL),
('测试','测试描述','90-1,,97',253,258,259,260,261,262,'2025-03-13 18:12:06','2025-03-13 20:55:16','2025-03-13 20:55:17');
但是报错:SQL 错误 [IX000]: 在此文句内需提供一个 blob 数据类型。
问题1、把content字段当成了blob,明明是text
问题2、编辑content字段,改成varchar,也不让改,报错:不可转换Text/Byte blob类型。
评论
再运行 插入语句
执行完成后,查询验证:
2,text字段类型不能直接修改为varchar、clob;
热门帖子
- 12025-12-01浏览数:182765
- 22023-05-09浏览数:25067
- 42023-09-25浏览数:18527
- 52020-05-11浏览数:17529