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

Chapter 8. Stored Procedures > Transact-SQL Program Commands

Transact-SQL Program Commands

You can use the program commands listed in Table 8-2 to include branching, loops, and so on, in stored procedures.

Table 8-2. Program Commands 
Command Description
BEGIN ... END Defines a block of commands (needed by IF and WHILE)
BREAK Terminates a WHILE loop
CONTINUE Starts the next WHILE loop
DECLARE Declares variables
EXECUTE Executes a stored procedure
GOTO Branches within the program to named position
IF ... ELSE Creates a branching
PRINT Outputs a message text, but Access ignores the PRINT output
RETURN Ends the stored procedure and can return a value as a result of the procedure
WAITFOR When executing the stored procedure, waits until a certain time is reached or until a time interval has elapsed
WHILE Defines a loop that runs until a termination condition is met



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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