Select CH.id, CH.studentId, ST.name, CH.recordId, RC.name
from checklist CH, student ST, record RC
Where CH.studentId=ST.id and CH.recordId=RC.id
Above is a query using mysql. The problem with the query above is that when the value of CH.recordId is null, it wont display any result. Now my question is how to display the result even though the CH.recordId is null? and in the mysql result tab, the CH.recordId and RC.name column will be just null.
Thanks.
Use explicit join syntax so that you can do a left join: