Click here to Skip to main content
15,892,927 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
How to use EXCEPT function in sql server, can any one help
Posted
Comments
Vedangi 11-Jul-12 7:28am    
You mean EXCEPT clause ??

I always think MSDN documentation is better place to before asking a question on CP.

Look here, it is quite descriptive:

http://msdn.microsoft.com/en-us/library/ms188055(v=sql.105).aspx[^]
 
Share this answer
 
Comments
Prasad_Kulkarni 12-Jul-12 0:06am    
Yes; always MSDN +5
Manas Bhardwaj 12-Jul-12 3:31am    
thx!
Sandeep Mewara 13-Jul-12 2:23am    
Good link. 5!
Manas Bhardwaj 13-Jul-12 3:43am    
thx!
hi anand once look at this
http://www.tutorialspoint.com/sql/sql-except-clause.htm[^]

best of luck
 
Share this answer
 
Please see the below example

SQL
select * from tablename1
except
select * from tablename2



Note : while using except

All queries combined using a UNION, INTERSECT or EXCEPT operator must have an equal number of expressions in their target lists.


Mark it answer if it is your solution.

Thanks
Ashish
 
Share this answer
 
v2

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