I have three tables named
**Student Table** ------------- id name ------------- 1 ali 2 ahmed 3 john 4 king **Course Table** ------------
Use this:
SELECT s.name AS Student, c.name AS Course FROM student s LEFT JOIN (bridge b CROSS JOIN course c) ON (s.id = b.sid AND b.cid = c.id);