SqlServer 通用操作
建表操作
建student表
create table student ( sno Char(8) primary key, sname Varchar(20), sex Char(2), sdept Varchar(20) );
建course表
create table course( cno Char(6) primary key, canme Varchar(20), )
建sc表
双主键加外键
create table Sc( sno Char (8), cno char (6), grade int , primary key (Sno, cno) , foreign KEY (Sno) references student(Sno), FOREIGN KEY(Cno) REFERENCES course( Cno) )