注释: comment on table "TEST" is '这是注释'; comment on column TEST.ID is '这是注释';
缺省值: create table test(id int,createtime default sysdate not null );//建表时创建 alter table test modify createtime default sysdate;//建表后修改
本文介绍了如何在SQL中为表和字段添加注释,以及如何设置字段的缺省值。通过具体示例展示了在创建表时直接定义缺省值的方法,以及通过ALTER TABLE命令来修改已存在表的字段缺省值。
注释: comment on table "TEST" is '这是注释'; comment on column TEST.ID is '这是注释';
缺省值: create table test(id int,createtime default sysdate not null );//建表时创建 alter table test modify createtime default sysdate;//建表后修改

被折叠的 条评论
为什么被折叠?