Use select distinct otherwise you obtain repeated rows do the join form REFERENCE, SYLLABUS, SUBJECT
And you shuold join the 3 tables anyway .. without knowing the join you can
INSERT INTO REFERENCE_SUBJECT (REFERENCE_ID,SYLLABUS_ID,SUBJECT_ID)
SELECT DISTINCT REFERENCE_ID SYLLABUS_ID SUBJECT_ID
FROM REFERENCE, SYLLABUS, SUBJECT;
manpreet
Best Answer
2 years ago
I want to copy primary key from table Subject, Reference, Syllabus into table Reference_Subject. This doesn't work:
The error is