Murach's SQL Server 2005 for Developers
How to code stored procedures, functions,
and triggers

This chapter shows you how to use Transact-SQL statements to code three types of database objects that store program code within a database for execution by anyone using the database: stored procedures, user-defined functions, and triggers.

Chapter 14 How to code stored procedures, functions, and triggers
Procedural programming options in Transact-SQL 400
Scripts 400
Stored procedures, user-defined functions, and triggers 400
How to code stored procedures 402
An introduction to stored procedures 402
How to create a stored procedure 404
How to declare and work with parameters 406
How to call procedures with parameters 408
How to work with return values 410
How to validate data and raise errors 412
A stored procedure that manages insert operations 414
How to delete or change a stored procedure 420
How to work with system stored procedures 422
How to code user-defined functions 424
An introduction to user-defined functions 424
How to create a scalar-valued function 426
How to create a simple table-valued function 428
How to create a multi-statement table-valued function 430
How to delete or change a function 432
How to code triggers 434
How to create a trigger 434
How to use AFTER triggers 436
How to use INSTEAD OF triggers 438
How to use triggers to enforce data consistency 440
How to use triggers to work with DDL statements 442
How to delete or change a trigger 444
Perspective 446
t




Murach's SQL Server 2005

Learn more about this book

View the table of contents

Add this book to your cart



Our Ironclad Guarantee

First, try our books for 90 days. Then, if you aren't completely convinced that our books are the best ones you've ever used, you can return them for a full refund...no questions asked.