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

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

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
Sangita Singh
profile Nguyen 4th July 2024

88VN continues to affirm the brand's name by receiving countless attention in today's entertainment market. The outstanding development has created a bridge of trust as more and more players come to try their hand. Readmore: trang chủ 88vn

Write a comment ...
Post comment
Cancel
profile Nguyen 30th June 2024

nohu90 have games to suit every player when playing Casino Online. Not only do we have hundreds of Casino games, we also offer many bonuses and promotions to our members. Readmore: nohu90

Write a comment ...
Post comment
Cancel
profile Nguyen 30th June 2024

97win have games to suit every player when playing Casino Online. Not only do we have hundreds of Casino games, we also offer many bonuses and promotions to our members. Readmore: 97 win

Write a comment ...
Post comment
Cancel
profile Nguyen 30th June 2024

77bet is known as one of the leading bookmakers in Asia. The 77bet website always brings useful information to you. This is the most prestigious bookmaker in Asia, known by many gamers Readmore: 77 bet

Write a comment ...
Post comment
Cancel
profile Nguyen 30th June 2024

i9bet41 - high quality professional entertainment platform, meets inspection criteria and licensed by the Philippine government. Outstanding with a diverse game store, attractive promotions, super-fast payments, dedicated and professional member support Readmore: i9 bet

Write a comment ...
Post comment
Cancel
profile Nguyen 25th June 2024

Go99 is certainly no longer unfamiliar to many familiar customers on Asian exchanges. Many advantages create a strong brand and position over many years of operation in Vietnam. We guarantee you won't have a moment of rest once you enter our bookmaker. Readmore: nhà cái go99

Write a comment ...
Post comment
Cancel
profile Nguyen 25th June 2024

CF68 is a super attractive game portal that is leading the online entertainment market. With a series of outstanding betting trends, it is a hot topic of discussion on forums. Readmore: nhà cái cf68

Write a comment ...
Post comment
Cancel
profile Nguyen 25th June 2024

Hopefully AOG777 will be your top choice for entertainment. AOG777 is confident in bringing you the best experience, the richest variety of games. - please click here Readmore: nhà cái aog777

Write a comment ...
Post comment
Cancel
profile Nguyen 25th June 2024

Hopefully AOG777 will be your top choice for entertainment. AOG777 is confident in bringing you the best experience, the richest variety of games. - please click here Readmore: nhà cái aog777

Write a comment ...
Post comment
Cancel
profile Nguyen 25th June 2024

Ole777 - high quality professional entertainment platform, meets inspection criteria and licensed by the Philippine government. Outstanding with a diverse game store, attractive promotions, super-fast payments, dedicated and professional member support Readmore: nhà cái ole777

Write a comment ...
Post comment
Cancel
profile Nguyen 25th June 2024

Kuwin Top reputable online casino in Vietnam⭐️Guaranteed reputation for ten years⭐️Register now, receive generous rewards immediately️ - please click here Readmore: nhà cái kuwin

Write a comment ...
Post comment
Cancel
profile Nguyen 23rd June 2024

vui88 Top reputable online casino in Vietnam⭐️Guaranteed reputation for ten years⭐️Register now, receive generous rewards immediately️ - please click here Readmore: trang chủ vui88

Write a comment ...
Post comment
Cancel
profile Nguyen 22nd June 2024

Helo88 (also known as Hello 88) is a bookmaker that is making waves in the online gaming community and those who love online betting. helo88 is not simply a bookmaker, but also a miniature entertainment world. With a series of interesting and exciting betting entertainment games. Readmore: helo 88

Write a comment ...
Post comment
Cancel
profile Nguyen 21st June 2024

88VN continues to affirm the brand's name by receiving countless attention in today's entertainment market. The outstanding development has created a bridge of trust as more and more players come to try their hand. Readmore: trang chủ 88vn

Write a comment ...
Post comment
Cancel
profile Nguyen 20th June 2024

Vin777 is one of the topics that attracts members' attention when discovering prestigious entertainment brands. In particular, attention is focused on Vin777 thanks to products that bring exciting experiences and impressive services Readmore: trang chủ vin777

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