1? label: 2 BEGIN 3! NOT ATOMIC 3? 3 ATOMIC 4? 4+ 4.0 SQL-variable-declaration 4.0 condition-declaration 4.0 return-codes-declaration 4.1 ; 5? 5+ 5 DECLARE CURSOR-statement ; 6? 6+ 6 handler-declaration ; 7+ 7? SQL-procedure-statement ; 8 END 9? label SQL-variable-declaration: 1 DECLARE 2+ , 2 SQL-variable-name 3 data-type 4! DEFAULT NULL 4? 4 DEFAULT constant 4.1? NOT NULL (1) condition-declaration: 1 DECLARESQL-condition-name CONDITION FOR 2! SQLSTATE 2.1! VALUE 2.1.1 string-constant return-codes-declaration: 1 DECLARE 2 SQLSTATE 2.1 CHARACTER(5) 2.1 CHAR(5) 2.2! DEFAULT '00000' 2.2? 2.2 DEFAULT string-constant 2 SQLCODE 2.1 INTEGER 2.1 INT 2.2! DEFAULT 0 2.2? 2.2 DEFAULT integer-constant handler-declaration: 1 DECLARE 2 CONTINUE 2 EXIT 2 UNDO 3 HANDLER FOR 4 specific-condition-value 4 general-condition-value 5 (2) 6 SQL-procedure-statement specific-condition-value: 1+ , 1.0 SQLSTATE 1.0.1! VALUE 1.0.2 string 1.0 condition-name general-condition-value: 1 SQLEXCEPTION 1 SQLWARNING 1 NOT FOUND data-type: 1 built-in-type 1 distinct-type-name