Passing values in parameters  Restrictions associated with stored procedures

Chapter 16: Using Stored Procedures

The output keyword

A stored procedure can return several values; each must be defined as an output variable in the stored procedure and in the calling statements. The output keyword can be abbreviated to out.

exec myproc @a = @myvara out, @b = @myvarb out

If you specify output while you are executing a procedure, and the parameter is not defined using output in the stored procedure, you see an error message. It is not an error to call a procedure that includes return value specifications without requesting the return values with output. However, you do not get the return values. The stored procedure writer has control over the information users can access, and users have control over their variables.





Copyright © 2005. Sybase Inc. All rights reserved. Restrictions associated with stored procedures

View this book as PDF