|
Arranged a bit:
CREATE TABLE xs_kc (
Student number char (6) NOT NULL,
Course number char (3) NOT NULL,
Score decimal (18, 0) NULL,
Credits int NULL,
CONSTRAINT PK_xs_kc PRIMARY KEY CLUSTERED (student number, course number),-primary key
CONSTRAINT FK_xs_kc_kc FOREIGN KEY (course number) REFERENCES dbo.kc (course number),-foreign key
CONSTRAINT FK_xs_kc_xs FOREIGN KEY (student number) REFERENCES dbo.xs (student number)-foreign key
) |
|