06-03-2011, 01:21 AM
|
#2 (permalink)
|
|
The Addict
Join Date: Aug 2008
Posts: 336
Thanks: 8
|
I don't seem to understand your problem, but I am guessing you want all the orders that have a staff_id that exists in the staffs table. If that is the case, you can do a left join:
SQL Code:
SELECT orders.staff_id FROM orders LEFT JOIN staffs ON orders.staff_id = staffs.staff_id
|
|
|
|