Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Product Manuals » ElevateDB Version 2 SQL Manual » SQL/PSM Statements » INSERT |
INSERT INTO <CursorName> [(<ColumnName> [,<ColumnName>])] VALUES (<Value> [,<Value>])
-- This procedure checks to see if the -- specified State exists in the States lookup -- table and inserts it if it isn't CREATE PROCEDURE LookupState(IN StateParam CHAR(2) COLLATE ANSI_CI) BEGIN DECLARE StateCursor SENSITIVE CURSOR FOR Stmt; PREPARE Stmt FROM 'SELECT * FROM States WHERE State = ?'; OPEN StateCursor USING StateParam; IF (ROWCOUNT(StateCursor) = 0) THEN INSERT INTO StateCursor ('State') VALUES (StateParam); END IF; CLOSE StateCursor; 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 © 2025 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |