SQL Quiz #10 – The OUTPUT Clause

The OUTPUT clause is supported in T-SQL for modification statements, which you can use to return information from modified rows. This clause, even if not as popular as others, is useful in multiple scenarios, for example:

  • for auditing purposes
  • confirmation messages
  • archiving your data

It can be used to return information about every row affected by an INSERT, UPDATE, DELETE or MERGE operation. 
You can find here some detailed information about the OUTPUT clause:
https://msdn.microsoft.com/en-us/library/ms177564.aspx
http://www.tech-recipes.com/rx/47032/a-beginners-guide-to-the-output-clause-in-sql-server/

If you feel that you have mastered this topic, test your knowledge with the following SQL quiz:

Are you ready to test your knowledge of working with the OUTPUT clause with the following quiz?

This week’s test has a difficulty level of: MODERATE
Quiz subject: Working with the OUTPUT clause

 

Good luck!