--创建表createtable test (
id varchar2(200)primarykeynotnull,
sort number,
name varchar(200))--字段加注释commentoncolumn test.id is'id';commentoncolumn test.sort is'序号';--表加注释commentontable test is'测试表'
二.Mysql
--创建表createtable test (
id varchar(200)notnull,
sort int(11)comment'排序',
name varchar(200)comment'名称',)--表加注释altertable test comment='测试表'
三.SqlServer
--创建表createtable test (
id varchar(200)primarykeynotnull,
sort int,
name varchar(200),)--给字段加注释EXEC sp_addextendedproperty N'test', N'序号', N'user', N'dbo', N'table', N'test', N'column', N'sort';--表加注释EXECUTE sp_addextendedproperty N'test', N'测试表', N'user', N'dbo',N'table', N'test',NULL,NULL
Oracle、Mysql、SqlServer创建表和给表和字段加注释一、Oracle--创建表create table test ( id varchar2(200) primary key not null, sort number, name varchar(200))--字段加注释comment on column test.id is 'id'; comment on column test.sort is '序号';--表加注释comment o