Summary

Today you have learned several concepts and techniques that should help you to create better more efficient triggers, functions, and stored procedures. You learned that tracking the elapsed time of a procedure will help to determine whether there is a problem in performance. You also saw how to use the RAISERROR and PRINT statements to display information about the SQL code that you are testing. In addition, you worked with a permanent worktable to store information about the procedure, such as start and end times.

Finally, you learned about the T-SQL debugging tool that is available in the Query Analyzer. The T-SQL debugging tool enables you to work with the stored procedure slowly; one statement at a time, if required. It also enables ...

Get Sams Teach Yourself Transact-SQL in 21 Days, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.