添加列:alter table hek_test_headers add col_test number;
修改列:alter table hek_test_lines modify litem varchar(40) not null;
删除列:alter table hek_test_lines drop columns col_test;
重命名列:alter table hek_test_lines rename column col_test to col_test2;
添加主键:alter table HEK_TEST_LINES add constraint pk_test primary key (LINEID);
添加外键: alter table hek_test_lines add constraint fk_test foreign key(hid) references
hek_test_headers(hid)
失效主键:alter table hek_test_lines disable constraint pk_test;
失效外键:alter table hek_test_lines disable constraint fk_test;
删除主键:alter table hek_test_lines drop constraint pk_test cascade;
删除外键:alter table HEK_TEST_LINES drop constraint fk_test;
Oracle修改表的一些常用语法
最新推荐文章于 2021-06-21 14:27:55 发布