SQL schema help

There is a create table error when I try and run this in access to generate the database schema and I’ve been staring at it for an hour and can’t spot it for some reason. Help would be appreciated haha.

create table Instructors (instr_id int not null, instr_name varchar(40) not null);

create table Course_Syl (course_syl_id int not null, course_code varchar(10) not null, course_term varchar(25) not null, course_description varchar(255) not null, instr_id int not null, syllabus_url varchar(255) not null);

create table Learning_Outcomes (lo_id int not null, lo_text varchar(255) not null, course_syl_id int not null);

alter table Instructors add constraint pk_Instructors primary key (instr_id); alter table Course_Syl add constraint pk_Course_Syl primary key (course_syl_id); alter table Learning_Outcomes add constraint pk_Learning_Outcomes primary key (lo_id);

alter table Instructors add constraint fk1_Instructors foreign key (instr_id) references Course_Syl (instr_id);

alter table Course_Syl add constraint fk1_Course_Syl foreign key (course_syl_id) references Learning_Outcomes (course_syl_id);

submitted by /u/NoE_TDrizzle
[link] [comments]


Go to Source of this post
Author Of this post: /u/NoE_TDrizzle
Title Of post: SQL schema help
Author Link: {authorlink}