Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

SQL IN Operator




In Operator allows to specify multiple values in where clause


SELECT *
FROM books
WHERE ISBN IN (123456, 456789, ...);

It also smart enough to support nested queries as well,

SELECT *
FROM books
WHERE ISBN IN (SELECT ISBN from registry);


Note : IN operator & JOIN operator behave similarly, when the values of the Joining table are distinct or they are made distinct by defining on inner query. 

.....



This post first appeared on Devdummy, please read the originial post: here

Share the post

SQL IN Operator

×

Subscribe to Devdummy

Get updates delivered right to your inbox!

Thank you for your subscription

×