执行以下SQL程序会报语法错误,已定位到就是COMMENT语句的问题,求解答
DECLARE
BEGIN
create table all_test ( id char(32) comment '主键' ,
s_char_byte char(12) comment '定长字符串字节型' ,
s_char_unicode char comment '定长字符串uni' ,
s_varchar varchar(12) comment '变长字符串' ,
s_varchar_byte varchar comment '变长字符串byte' ,
s_varchar_unicode varchar(12) comment '变长字符串uni' ,
s_text text comment '大文本' ,
s_clob clob comment '大文本clob' ,
s_tinytext text comment '大文本tiny' ,
s_mediumtext text comment '大文本m' ,
s_text_long text comment '大文本l' ,
s_text_unicode clob comment '大文本uni' ,
i_tinyint tinyint comment '整型' ,
i_mint int comment '整型m' ,
i_int int comment '整型i' ,
i_lint bigint comment '整型b' ,
i_float float comment '单精度浮点数' ,
i_double double comment '双精度浮点数' ,
i_decimal decimal(12,
12) comment '定点数' ,
t_date date comment '日期date' ,
t_time time(6) comment '日期time' ,
t_timestamp timestamp(9) comment '时间戳' ,
e_blob blob comment '二进制大对象' ,
e_blob_tiny blob comment '二进制大对象t' ,
e_blob_m blob comment '二进制大对象m' ,
e_blob_l blob comment '二进制大对象l' ,
j_json clob comment 'json' ,
t_datetime timestamp(9) comment '日期datetime' ,
create_time timestamp(9) comment '创建时间' ,
update_time timestamp(9) comment '更新时间' ,
constraint all_test_pkey primary key(id));
select * from all_test;
comment on table all_test is '全字段类型测试';
END;
/
SQL程序/存储部分语法不支持,你可以参考一下这个链接,https://eco.dameng.com/document/dm/zh-cn/pm/dm8_sql-sql-statement