Chapter 13. Designing and Implementing T-SQL Routines

Exam objectives in this chapter:

  • Create Database Objects

    • Create and alter DML triggers.

  • Modify Data

    • Create and alter stored procedures (simple statements).

    • Work with functions.

T-SQL code can be stored within Microsoft SQL Server databases by using T-SQL routines such as stored procedures, triggers, and functions. This helps make your T-SQL code more portable, because it stays with the database and these routines will be restored from a database backup along with the database data. These routines can then be executed from the database as well. In this chapter, you learn about creating reusable T-SQL routines in stored procedures, triggers, and user-defined functions.

Lessons in this chapter:

Get Training Kit (Exam 70-461): Querying Microsoft® SQL Server® 2012 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.