Hi guys, I am a newbie with mysql. I am creating tables but i get stuck when it comes to foreign keys. I tried to remove the foreign keys and than paste the rest of the code, add an additional column of the foreign key but still its not working. Could someone assist me please. i will really be grateful.
create table Doctors_Appointment
(Doc_Appointment_Number REFERENCES Patient_Appointment_Number(Doc_Appointment_Number) not null,
Treatment_ID REFERENCES Doctors_Treatment(Treatment_ID)not null))
@r937.com | rudy.ca , InnoDB is the storage engine for MySQL. Am i supposed to include it within my code? On the other hand, after making the proposed changes, I still get the following error after : #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘not null, Treatment_ID REFERENCES Doctors_Treatment(Treatment_ID)not null))’ at line 3.