Click here to Skip to main content
15,904,817 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
select account from table where acccount (1,2,3,4,5)

if in the above list 4 is not there in the table, it has to display

4
Posted
Comments
deepankarbhatnagar 13-Jan-16 0:56am    
Not getting your query?
Member 10495885 13-Jan-16 1:03am    
i have some list of numbers with me, i want to check that numbers in a specified table available or not, if any number is not available in the table from the list of given numbers, then that unavailable number need to be display
Mohibur Rashid 13-Jan-16 1:51am    
Try NOT IN
Abdul Hannan Ijaz 13-Jan-16 2:58am    
can there be more than 5 account numbers ?
Member 10495885 13-Jan-16 3:24am    
yes

1 solution

C#
select account from table where acccount not in (1,2,3,4,5) 
 
Share this answer
 

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