RAISE statement now can accept not only NUMER and STRING constants, but also variable of a stored procedure.
RAISE errNumber, errMsg
RAISE statement now can accept not only NUMER and STRING constants, but also variable of a stored procedure.
RAISE errNumber, errMsg
Up to now the statement RAISE did have syntax as:
raise errNumber [, errMsg]
Now it is
raise [errNumber [, errMsg]]
Except syntax also is implemented additional logic:
raise without parameters means throw the same exception forward.
BEGIN
INSERT INTO t1 VALUES(1);
INSERT INTO t1 VALUES(1);
EXCEPTION
WHEN 23503 THEN
PRINT 'Unique violation'
RAISE;
END;