Click here to Skip to main content
15,916,835 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
Hi,

Please guide me the syntax to use "NOT IN" keyword in sql.
Posted
Updated 18-Apr-16 1:46am
v2

 
Share this answer
 
v2
Comments
Maciej Los 8-May-13 14:39pm    
+5
Dhivya.J 8-May-13 23:24pm    
Thank you
SQL
NOT EXISTS
 
Share this answer
 
Comments
NOT IN means searching(looking for) data except values specified in NOT IN clause.

i.e
table--tbl

empId empName
1 A
2 B
3 C

select empName from tbl where empId NOT IN (2)

OUTPUT:
empName
A
C
 
Share this answer
 
v3
Comments
Richard Deeming 17-Dec-14 9:22am    
This question is over 18 month old!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900