One useful enhancement to the actual SQL language is the OUTPUT clause, which allows you to retrieve the set of rows affected by a data modification command.

This story continues at http://www.databasejournal.com/news/article.php/3748381