I have three tables named
**Student Table** ------------- id name ------------- 1 ali 2 ahmed 3 john 4 king **Course Table** ------------
Use ANSI syntax and it will be a lot more clear how you are joining the tables:
SELECT s.name as Student, c.name as Course FROM student s INNER JOIN bridge b ON s.id = b.sid INNER JOIN course c ON b.cid = c.id ORDER BY s.name