Key column 'r_Course_id' doesn't exist in table Error in my code I used the following syntax and keep getting the following error at the end.
" Key column 'r_Course_id' doesn't exist in table"

CREATE TABLE Faculty (
Faculty_id INT NOT NULL,
First_Name VARCHAR (20) NOT NULL,
Last_Name VARCHAR (20) NOT NULL,
EMAIL VARCHAR (30) NOT NULL,
Date_of_birth VARCHAR (30) NOT NULL,
Number_of_courses int,
PRIMARY KEY (Faculty_id)
);

CREATE TABLE Courses (

Course_id  INT NOT NULL,
Discipline VARCHAR (20)NOT NULL,
Course_number INT NOT NULL,
Credit DECIMAL(7,2)NOT NULL,
Year_offerd INT ,
Course_Title VARCHAR (50)NOT NULL,
PRIMARY KEY (Course_id )
);

CREATE TABLE FacultyCourses (
Course_id  INT NOT NULL
FOREIGN KEY (Course_id) REFERENCES Courses (Course_id),
FOREIGN KEY (Faculty_id)REFERENCES Faculty(Faculty_id),
F_C_ID int NOT NULL AUTO_INCREMENT,
PRIMARY KEY (F_C_ID)
);


the first two tables are created without a flaw, however the third is giving me trouble. please help.
You were missing a few things. There was no faculty_id column in the last table and you missed a comma  after course_id.

Try running the statements below (it works for me).

CREATE TABLE Faculty (
Faculty_id INT NOT NULL,
First_Name VARCHAR (20) NOT NULL,
Last_Name VARCHAR (20) NOT NULL,
EMAIL VARCHAR (30) NOT NULL,
Date_of_birth VARCHAR (30) NOT NULL,
Number_of_courses int, PRIMARY KEY (Faculty_id) 
);

CREATE TABLE Courses (
Course_id INT NOT NULL,
Discipline VARCHAR (20)NOT NULL,
Course_number INT NOT NULL,
Credit DECIMAL(7,2)NOT NULL,
Year_offerd INT ,
Course_Title VARCHAR (50)NOT NULL,
PRIMARY KEY (Course_id ) );

CREATE TABLE FacultyCourses (
F_C_ID int NOT NULL AUTO_INCREMENT,
Course_id INT NOT NULL,
Faculty_id INT NOT NULL,
FOREIGN KEY (Course_id) REFERENCES Courses (Course_id),
FOREIGN KEY (Faculty_id) REFERENCES Faculty(Faculty_id),
PRIMARY KEY (F_C_ID) );