oracle 添加外鍵約束

-- Add/modify columns 添加一列
alter table T_TABLE_SHU add parent_id number;
-- Create/Recreate primary, unique and foreign key constraints
--格式 : alter table 表名  add constraint 約束名 forreign key (列名)
alter table T_TABLE_SHU
  add constraint sys_name foreign key (PARENT_ID)
  references t_table_shu (ID);

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章