Contents of Database Procedures
A database procedure can include the following entities:
• Local variable declarations
• Data manipulation statements such as SELECT or INSERT
• Control flow statements such as IF, FOR, and WHILE
• Status statements, such as MESSAGE, RETURN, RETURN ROW, and RAISE ERROR
The DBMS Server resolves all references to database objects in a database procedure at the time the procedure is created. For this reason, all referenced objects must exist at the time the procedure is created. If, at the time it is created, a procedure refers to a DBA-owned table, the procedure always uses that table, even if a user that owns a table with the same name executes the procedure.
Note: Database local variables must be preceded by a colon when used in data manipulation statements.
Last modified date: 04/03/2024