Im trying to do Left and Right join but its not working properly . Lemme show you..
Student Table
Address Table
What's i'm doing?
SELECT * FROM student JOIN address ON student.tid = address.stud_tid
Output:
SELECT * FROM student LEFT JOIN address ON student.tid = address.stud_tid
Output:
SELECT * FROM student RIGHT JOIN address ON student.tid = address.stud_tid
Output:
May i know why im getting the same out put in every case ?
it should be like rows output like this one
That's because your data are complete. Every student has an address. If you remove one or more addresses, results will be different.