Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

SQL statements in routines

In the SQL statements for creating and designing routines below, other SQL statements can also be used:

  • CREATE FUNCTION, CREATE PROCEDURE

  • CASE, COMPOUND (there also in exception routines), FOR, IF, LOOP, REPEAT, WHILE

Restrictions must be borne in mind for some of these statements.

To make these statements easier to read, the syntax element routine_sql_statement is described centrally here for these other SQL statements.


routine_sql_statement ::=

{

case_statement

for_statement

if_statement

iterate_statement

leave_statement

loop_statement

repeat_statement

set_statement

while_statement

return_statement

call_statement

single_row_select_statement

insert_statement

update_searched_statement

delete_searched_statement

merge_statement

open_statement

fetch_statement

update_positioned_statement

delete_positioned_statement

close_statement

get_diagnostics_statement

signal_statement

resignal_statement

}



routine_sql_statement

routine_sql_statement has a maximum length of 32000 characters.


The permitted SQL statements are presented in the following groups: