修改table 的常用方法

添加列:  alter table test_headers add col_test number;

修改列:  alter table test_headers modify litem varchar2(40) not null;

删除列:  alter table test_lines drop column col_test;

重命名:  alter table test_lines rename column col_test to col_test1;

添加主键: alter table test_hlines add constraint pk_test primary key(lineid);

添加外键: alter table test_lines add constraint fk_test foreign key (hid) reference test_headers(hid)

失效主键: alter table test_lines disable constraint pk_test;

失效外键: alter table test_lines disable constraint fk_test;

删除主键: alter table test_lines drop constraint pk_test cascade;

删除外键: alter table test_lines drop constraint fk_test

相关文章:

  • 2021-07-01
  • 2021-11-14
  • 2021-09-16
  • 2022-12-23
  • 2022-12-23
  • 2021-03-31
  • 2021-05-21
  • 2021-09-19
猜你喜欢
  • 2021-12-08
  • 2022-12-23
  • 2022-12-23
  • 2022-02-03
  • 2021-12-04
  • 2022-12-23
  • 2022-02-17
相关资源
相似解决方案