Find records from one table that not exists in other table.

Sangita Singh

If we have product table and order table and we need to get those products which have not ordered by any customer as shown in above image.
SELECT p.id FROM product as p LEFT JOIN orders as o ON p.id = o.product_id WHERE o.product_id IS NULL
0
0

I recently encountered a personal statement writing service. It's good that now there are many residencypersonalstatements.net services that help a future student choose. I chose professionals who I think will help me and my application will be considered in the forefront.
Write a comment ...
Post comment
Cancel

An extremely interesting share, besides cookie clicker is a great clicker game for you.
Write a comment ...
Post comment
Cancel
Please rotate your device
We don't support landscape mode on your device. Please rotate to portrait mode for the best view of our site