79807268

Date: 2025-11-02 17:27:10
Score: 2.5
Natty:
Report link

You need to say ADD FOREIGN KEY, not just FOREIGN KEY. (See https://www.w3schools.com/mysql/mysql_foreignkey.asp). It will probably look like

ALTER TABLE course
ADD FOREIGN KEY (student_id)
REFERENCES students(student_id);
Reasons:
  • Probably link only (1):
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: PT-Hrothgar