August 2010
Intermediate to advanced
1224 pages
34h 17m
English
A stored procedure is a SQL statement (or series of statements) stored in a database and compiled. With SQL Server, stored procedures consist of Transact-SQL (T-SQL) code and have the capability to involve many coding constructs not typically found in ad hoc queries. For instance, you can implement error-handling routines within a stored procedure and even call into operating-system functions with so-called extended stored procedures.
For a given database, right-click the stored procedures folder in Server Explorer and select Add New Stored Procedure. A template for a stored procedure opens in the SQL Editor. The SQL Editor is a close sibling to Visual Studio’s Code Editor; although it doesn’t have IntelliSense, it ...