Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- create table exams (
- exam_id int identity(1,1) not null,
- student_id int not null,
- tutor_id int not null,
- subject_id int not null,
- exam_date date not null,
- place_id int not null,
- constraint student_foreign Foreign key (student_id) References students(student_id) on update cascade on delete no action,
- constraint tutor_foreign Foreign key (tutor_id) References tutors(tutor_id) on update cascade on delete no action,
- constraint subject_foreign Foreign key (subject_id) References subjects(subject_id) on update cascade on delete no action,
- constraint place_foreign Foreign key (place_id) References places(place_id) on update cascade on delete no action,
- constraint prim_exam primary key (exam_id)
- )
- alter table students add constraint not_less check(10000 < zip_code and zip_code < 99999 );
- create table new_places (
- place_id int identity(1,1) not null constraint prim_new primary key(place_id),
- building varchar(10) not null,
- audience varchar(10) not null
- )
Advertisement
Add Comment
Please, Sign In to add comment