Forum Moderators: coopster

Message Too Old, No Replies

LEFT JOIN and RIGHT JOIN

what are left join and right join used for in a mysql query

         

zRonin

6:09 pm on Jun 12, 2005 (gmt 0)

10+ Year Member



This is just going to make everyone think I know nothing about programming, but I have to ask it. What are LEFT JOIN and RIGHT JOIN used for? I haven't ever used a script besides a bulletin board that used "JOIN" and I am not sure what it was used for because I had the bulletin board several years ago. I was just on the MySQL website and saw that JOIN was grouped in with some of the optimization documents, and I firgured it was time to learn.

If someone could give me an example of how it is used or just a brief demonstration that would be really helpful.

dreamcatcher

6:29 pm on Jun 12, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



They are for joining two lots of data from seperate tables:

[dev.mysql.com...]