It would help a lot if you described your situation - what exactly do you want the query to show? What's in the table you specified? What other information do you need to get to make that query work?
If you want to, say, find the ID of a worker, then find their shifts in another table, you'd use a nested query.
I'm not sure if this works with mysql, but for mssql you'd use something like
SELECT * FROM shifts WHERE worker_id IN (SELECT worker_id FROM workers WHERE worker_name = 'Jon')
This would give you all of Jon's shifts.
Last edited by BaDgEr; 02-15-2006 at 03:45 PM..