一个表的列怎么设置成另外两个表的外键
UserId回复者IdVarchar(20)非空TeacherUsesr表或StudentUsers表的外键
[解决办法]
alter table useradd constraint fk_test foreign key(UserId)references TeacherUsesr(UserId)goalter table useradd constraint fk_test foreign key(UserId)references StudentUsers(UserId)go