oracle 创建表、删除表、添加字段、删除字段、表备注、字段备注、修改表属性 1、创建表 1 create table 表名( 2 classid number(2) primary key, 4 表字段 数据类型 是否允许为空(not null:不为空/null:允许空) 默认值(default 'XXX') 5 ); 2、删除表(慎用) 1 drop table 表名 3、给表加表备注 1 comment on table 表名 is 'XXXXXX' 4、给表字段加备注 1 comment on column 表名.字段名 is 'XXXXX' 5、修改表字段属性 1 alter table 表名 modify (字段名 字段类型 默认值 是否为空); 6、删除表字段 1 alter table 表名 drop column 字段名 7、添加表字段 1 格式:alter table 表名 add (字段名 字段类型 默认值 是否为空); 2 3 例:alter table sf_users add (userName varchar2(30) default '空' not null);