Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Product Manuals » ElevateDB Version 2 SQL Manual » SQL/PSM Statements » EXCEPTION |
[Label:] BEGIN [<Statement>;] [<Statement>;] EXCEPTION [<Statement>;] END [Label];
-- This procedure uses an EXCEPTION -- block to handle any exceptions while -- executing a CREATE TABLE statement CREATE PROCEDURE CreateTestTable() BEGIN DECLARE stmt STATEMENT; PREPARE stmt FROM 'CREATE TEMPORARY TABLE "TestTable" ( "FirstColumn" INTEGER, "SecondColumn" VARCHAR(30), "ThirdColumn" CLOB, PRIMARY KEY ("FirstColumn") ) DESCRIPTION ''Test Table'''; EXECUTE stmt; EXCEPTION IF ERRORCODE()=700 THEN RAISE ERROR CODE 10000 MESSAGE 'Syntax error'; ELSE RAISE ERROR CODE 10000 MESSAGE 'Unexpected error - ' + ERRORMSG(); END IF; END
Deviation | Details |
Extension | This SQL statement is an ElevateDB extension. |
This web page was last updated on Thursday, November 16, 2023 at 10:39 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |