给表添加字段:

语法:alter table tablename add (column1 datatype [default value][null/not null],column2 datatype [default value][null/not null]….);
说明:alter table 表名 add (字段1名  字段类型 默认值 是否为空, 字段2名 字段类型  默认值 是否为空....);
举例:alter table tb_user add (english_name varchar2(100) default 'admin' not null,income number(17,2));--注意如果字段not null只能往空表里插,也就是表里没有数据的时候给添加的字段添加注释:

给添加的字段添加备注:

comment on column 表名.字段   is   '备注名 ';

comment on column tb_user.english_name is '英文名';
comment on column tb_user.income is '收入';

但是你发现了木,只能把新添加的字段追加到表的最后,不能直接指定添加到某个字段的后面,这个在oracle不能实现吗?

更多推荐

给oracle数据库现有表添加字段