i have two tables timetable and subject and i need id,subject_name from subject table which is not used in timetable for specific section.
but it is returning multiple values as you can see in image below.
I am using this query
SELECT subject.id, subject.subject_name
FROM timetable
LEFT JOIN subject
ON timetable.subject_id != subject.id AND timetable.class_id = subject.class_id
WHERE timetable.class_id = 1 and timetable.section_id =1