O'Reilly logo

Microsoft® Access Projects with Microsoft SQL Server™ by Natascha Nicol, Ralf Albrecht

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required