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);

猜你喜欢

转载自672627493.iteye.com/blog/2096245