MySQL LEFT JOIN syntax Aug04 '05

Feedback

# (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

# (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

Previous comment Return to entry

# (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.

Previous comment Return to entry

RSS feed for comments on this post

Leave feedback

Feedback

Input format: The editor controls below will assist with Markdown syntax.

Status

Sub-status

Your info

Return to entry.

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

Read more...