• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 25. DEVELOPING SQL SERVER PROJEC... > WORKING WITH STORED PROCEDURES

WORKING WITH STORED PROCEDURES

If you've ever written a VBA function or event procedure, you understand the concept of creating a block of code that achieves a specific result and may include flow-control statements and accept or return argument values. This concept describes SQL Server stored procedures, which are named, saved code routines that perform operations on server data. They're written in the Transact-SQL language (T-SQL for short). Here are the primary attributes of a stored procedure:

  • It's compiled at the time it's saved on the server so that it executes quickly.

  • Because it's a database object, security permissions/restrictions can be applied to it by using SQL Server's security model.

  • It can accept parameters and can return values—variables and recordsets—to the user interface or calling routine.

  • It can include If..Else logic to control the code flow conditionally.

  • It can contain multiple SQL statements that operate on data.

  • It can call other stored procedures.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint