Lucky-GG: alter table 表名 add constraint 外键约束名 foreign key(列名) references 引用外键表(列名) 如: alter table Stu_PkFk_Sc add constraint Fk_s foreign key (sno) references Stu_PkFk_S(sno)
idea 代码格式化快捷键
sql添加删除主键、外键
Lucky-GG: alter table 表名 add constraint 外键约束名 foreign key(列名) references 引用外键表(列名) 如: alter table Stu_PkFk_Sc add constraint Fk_s foreign key (sno) references Stu_PkFk_S(sno)