adspace


What is use of except clause? How does it differ from not in clause?

Answer Posted / Ankush Gupta

The EXCEPT clause in SQL Server is used to exclude rows that appear in the right query, but not in the left query. In other words, it returns only the differences between two result sets. The NOT IN operator also compares rows from one table with another, but it does not require the exact order of the results.nnExample: Using EXCEPT:nSELECT ProductID FROM Orders WHERE ProductID NOT EXISTS (SELECT ProductID FROM OrderDetails);nExample using NOT IN:nSELECT * FROM Customers WHERE CustomerID NOT IN (SELECT CustomerID FROM Orders)

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is standby servers? Explain types of standby servers.

1081


Explain system functions or built-in functions? What are different types of system functions?

1067


Does view occupy space?

1022


What is normalization and what are the advantages of it?

1057


How can we solve concurrency problems?

1123


How can you append an identity column to a temporary table?

1071


Can one drop a column from a table?

1091


What is subquery? Explain the properties of a subquery?

1063


What are the different types of subquery?

1235


What is the difference between upgrade and migration in sql server?

1185


How to remove duplicate rows from table except one?

1090


What is sql server query analyzer?

1131


Disadvantages of the indexes?

1225


explain different types of backups avaialabe in sql server? Given a particular scenario, how would you go about choosing a backup plan? : Sql server database administration

1134


what is the Ticketing tool used in Wipro technologies at Bangalore...???

8232