SQL Statement Reference
Each individual SQL statement is described in this section. The descriptions are listed in alphabetical order by statement.
The following table summarizes each RaimaDB SQL statement. The following table summarizes each RaimaDB SQL statement. Those statements that include “(SQL PL)” in the description can only be used within a stored procedure or function.
| Statement | Description |
|---|---|
| BEGIN | (SQL PL) Begin a compound statement block |
| CALL | Call a stored procedure |
| CASE | (SQL PL) Case statement |
| CLOSE | (SQL PL) Close an open cursor |
| CLOSE DATABASE | Close an open database |
| COMMIT | Commit transaction's changes to the database |
| CREATE DATABASE | Create a database or schema definition |
| CREATE FUNCTION | Create a stored function |
| CREATE PROCEDURE | Create a stored procedure |
| deallocate prepare | (SQL PL) Deallocate a previously prepared statement |
| declare condition | (SQL PL) Declare a condition |
| DECLARE CURSOR | (SQL PL) Declare a cursor |
| declare handler | (SQL PL) Declare a condition or exception handler |
| declare variable | (SQL PL) Declare a variable |
| DELETE | Delete one or more rows from a table |
| DROP DATABASE | Drop a database |
| DROP FUNCTION | Drop a stored function |
| DROP PROCEDURE | Drop a stored procedure |
| end | (SQL PL) End a compound statement block |
| execute | (SQL PL) Execute a prepared statement |
| FETCH | (SQL PL) Fetch the next row from a cursor |
| for | (SQL PL) For statement |
| get diagnostics | (SQL PL) Get diagnostic info for a statement or condition |
| if | (SQL PL) If – then – else statement |
| initialize database | Initialize a database |
| insert | Insert a row or rows into a table |
| iterate | (SQL PL) Iterate the loop associated with the specified label |
| leave | (SQL PL) Leave the loop associated with the specified label |
| loop | (SQL PL) Loop statement |
| OPEN | (SQL PL) Open a cursor |
| OPEN DATABASE | Open a database |
| PERSIST DATABASE | Persist in-memory database to persistent storage |
| prepare | (SQL PL) Prepare an SQL statement |
| RELEASE SAVEPOINT | Release a transaction savepoint |
| repeat until | (SQL PL) Repeat – until statement |
| resignal | (SQL PL) Resignal a condition or exception |
| ROLLBACK | Rollback (undo) a transaction's changes |
| SAVEPOINT | Mark a transaction savepoint |
| SELECT | Retrieve a set of rows of data from the database |
| set open mode | Set the default database open mode |
| set storage media | Set the storage media type |
| set variable value | (SQL PL) Set a variable to a value. |
| set control option | Set an SQL control option value |
| set statistics | Set UPDATE STATS execution control options |
| set transaction | Set transaction operational mode |
| signal | (SQL PL) Signal a condition or exception |
| START TRANSACTION | Start a transaction |
| UPDATE | Update one or more rows in a table |
| UPDATE STATISTICS | Update the data distribution statistics used by the SQL optimizer |
| while | (SQL PL) While statement |