0

create table Course (
courseId char(5),
subjectId char(4) not null,
courseNumber integer,
title varchar(50) not null,
numOfCredits integer,
primary key (courseId)
);


create table Student (
ssn char(9),
firstName varchar(25),
mi char(1),
lastName varchar(25),
birthDate date,
street varchar(25),
phone char(11),
zipCode char(5),
deptId char(4),
primary key (ssn)
);


create table Enrollment (
ssn char( 9),
courseId char( 5),
dateRegistered date,
grade char( 1),
primary key (ssn, courseId),
foreign key (ssn) references Student,
foreign key (courseId) references Course
);

the table "Enrollment" can not be created. where is the wrong?

2
Contributors
3
Replies
4
Views
5 Years
Discussion Span
Last Post by StephNicolaou
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.