设置主、外键

sql语句建表时设置主、外键

 

create table Project_Voice

(

ID int not null,

voiceID int not null,

projectID int not null,

primary key(ID),

foreign key(voiceID) references dbo.Voice(ID),

foreign key(projectID) references dbo.Project(ID)

)

posted @ 2016-09-30 15:58  Zbu  阅读(376)  评论(0编辑  收藏  举报