I\'m trying to learn SQL and am having a hard time understanding EXISTS statements. I came across this quote about \"exists\" and don\'t understand something:
If you had a where clause that looked like this:
WHERE id in (25,26,27) -- and so on
you can easily understand why some rows are returned and some are not.
When the where clause is like this:
WHERE EXISTS (select * from orders where suppliers.supplier_id = orders.supplier_id);
it just means : return rows that have an existing record in the orders table with te same id.