Your database has two tables related to product models, named ProductModel and NewProductModel. You want to view all products that are listed in both tables but do not want to view duplicate entries.

Which of the following Transact-SQL statements can you use to accomplish this goal?

 Posted by Rajkatie on 6/30/2013 | Category: Sql Server Interview questions | Views: 8013 | Points: 40
Select from following answers:
  1. SELECT ProductModelID, Name FROM ProductModel UNION SELECT ProductModelID, Name FROM NewProductModel ORDER BY Name
  2. SELECT ProductModelID, Name FROM ProductModel UNION ALL SELECT ProductModelID, Name FROM NewProductModel ORDER BY Name
  3. SELECT ProductModelID, Name FROM NewProductModel EXCEPT SELECT ProductModelID, Name FROM ProductModel ORDER BY Name
  4. All Above

Show Correct Answer


Source: measureup.com | | Alert Moderator 

Comments or Responses

Login to post response