![]() | Products |
| 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 Tuesday, September 16, 2025 at 04:56 PM | Privacy Policy © 2025 Elevate Software, Inc. All Rights Reserved Questions or comments ? |

