hi all i am just a beginner sql programmer and as a matter of fact i don't know why the ff is not working in mysql: CREATE TABLE interests ( int_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, interest VARCHAR(50) NOT NULL, contact_id INT NOT NULL, CONSTRAINT my_contacts_contact_id_fk, FOREIGN KEY (contact_id), REFERENCES my_contacts (contact_id) ); i already have a my_contacts table.
Change it to: CONSTRAINT my_contacts_contact_id_fk FOREIGN KEY (contact_id) REFERENCES my_contacts (contact_id) I don't think you need comma between CONSTRAINT ... FOREIGN ... REFERENCES