Tell me what is use of except clause? How it differs from not in clause?



Tell me what is use of except clause? How it differs from not in clause?..

Answer / Neel Mani Shukla

The EXCEPT and NOT IN clauses are both used for excluding records from a result set in SQL Server, but they differ in their behavior and usage. The EXCEPT operator returns only the rows that exist in the left-hand side query result and do not exist in the right-hand side query result. Whereas, the NOT IN operator returns all the rows in the left-hand side query result that are not present in the right-hand side query result. In other words, EXCEPT eliminates duplicate rows while NOT IN does not.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL Server Interview Questions

difference between select column name from table name where serviceid=2; and select max(column name) from table name where serviceid=2; IN ORACLE

3 Answers   Intel, Wipro,


What is inline variable assignment?

1 Answers  


can any one please send sql quries most used in applications.

2 Answers  


what is sql server? : Sql server database administration

1 Answers  


What are functions in the sql server?

1 Answers  


What are the differences between clustered and non-clustered index?

1 Answers  


How to Update from select query in sql server?

1 Answers  


Differentiate between sql temp table vs table variable?

1 Answers  


After creating the cube, if we added a new column to the oltp table then how you add this new attribute to the cube? : sql server analysis services, ssas

1 Answers  


what is database replication? : Sql server database administration

1 Answers  


How to know whether our backup is succesfully taken?

1 Answers  


What's the maximum size of a row?

4 Answers   IBM,


Categories