MySQL LEFT JOIN syntax Aug04 '05
Feedback
# (2 of 3): Mamta Chaurasia
1 year, 10 months after the fact. (Mon 25 Jun 2007, 2:50 AM CST)
Could you please tell me, if there is any thing wrong with this query,
select u.id,u.fname,u.lname,r.role from users u LEFT JOIN resumes r ON (u.id=r.uid) where u.enabled=1 order by r.flag and r.updated limit 10;
where flag is enum value 1,0 and updated is datetime
Thanks in advance Mamta
# (3 of 3): Anonymous Coward
2 years, 10 months after the fact. (Mon 09 Jun 2008, 3:35 PM CST)
Thank you! It was just what I was looking for.
RSS feed for comments on this post
Leave feedback
When working with MySQL, sometimes it’s good to check which rows exist in one table, that don’t exist in another. A LEFT JOIN statement allows us to do this.
You are at the feedback permalink page for: MySQL LEFT JOIN syntax
# (1 of 3): Yas
1 year, 10 months after the fact. (Sat 23 Jun 2007, 12:23 PM CST)
Excellent tutorial and simplified beautifully.. thanx a lot for this