[thelist] Joining tables... in MySQL

Sarah Adams mr.sanders at geekjock.ca
Wed Apr 4 09:24:10 CDT 2007

> SELECT * FROM jobType, jobs WHERE jobType.id = jobs.jobType
> /me doesn't understand why so many people try to force themselves into
> left/inner/right joins when you can just say "where this is that"

The query you suggested will only return jobTypes with corresponding
jobs, rather than all jobTypes. In this case, the OP said: "I want to
list all job types, and IF there's any corresponding with the jobs
table, I want to marry them up."

sarah adams
web developer & programmer
portfolio: http://sarah.designshift.com
blog: http://hardedge.ca

More information about the thelist mailing list