solidDB Help : Programming : SQL extensions : Stored procedures : Stored procedure structure
  
Stored procedure structure
A stored procedure is a standard solidDB database object that can be manipulated by using the standard DDL statements CREATE and DROP, see CREATE PROCEDURE and DROP PROCEDURE.
Procedures can be run by issuing a CALL statement followed by the name of the procedure to be invoked, see CALL:
Procedure names must be unique within a database schema.
All the standard naming restrictions that are applicable to database objects, like using reserved words and identifier lengths, also apply to stored procedure names. For an overview and complete list of reserved words, see SQL: Reserved words.
A stored procedure communicates with the calling program by using parameters. solidDB supports two methods to return values to the calling program:
standard SQL-99 method, which uses parameters, see Using parameters for input and output in a stored procedure,
a solidDB proprietary method, RETURNS, which uses result sets, see Using RETURNS to provide output from a stored procedure.
The procedure body contains the actual stored procedure program based on assignments, expressions, and SQL statements. For details about the expressions and control statements that you can use in stored procedures, see SQL: Expressions and Using control statements.
Any type of expression, including scalar functions, can be used in a procedure body. For valid expressions, see expression.
See
Declaring variables in a stored procedure
Assigning values to variables
Exiting a procedure
Go up to
Stored procedures