1.oracle添加字段语句
添加语句
alter table 表名 add (字段名 类型);
alter table test add (colum varchar2(512));
添加多个语句
alter table test add (column1 varchar2(512),column2 varchar2(512),column3 varchar2(512));
2.oracle添加字段描述
comment on column 表名和字段 is '参数描述';
comment on column test.column1 is '字段1';
3.oracle删除字段
alter table 表名 drop (字段名);
alter table test drop (column);
4.修改字段
alter table 表名 column 字段 to new_column;
alter table test column column to new_column;
5.添加主键
alter table test constraint pk_test primary key(testid);