SQL Statements

This chapter documents SQL statements in Mimer SQL.

In SQL there are different types of statements:

Procedural statements, including DML (Data Manipulation Language), see Procedural SQL Statements.

Data definition (DDL) statements, see Data Definition Statements.

Access control statements, see Access Control Statements.

Connection statements, see Connection Statements.

Declarative statements, see Declarative Statements.

Embedded SQL statements, see Embedded SQL Statements.

Embedded SQL control statements, see Embedded SQL Control Statements.

System administration statements, see System Administration Statements.

Access Control Statements

Access control statements can be divided into two categories: GRANT and REVOKE.

For information on GRANT statements, see:

GRANT ACCESS PRIVILEGE

GRANT OBJECT PRIVILEGE

GRANT SYSTEM PRIVILEGE.

For information on REVOKE statements, see:

REVOKE ACCESS PRIVILEGE

REVOKE OBJECT PRIVILEGE

REVOKE SYSTEM PRIVILEGE.

Connection Statements

For information on connection statements, see:

CONNECT

DISCONNECT

ENTER

LEAVE (PROGRAM ident)

SET CONNECTION.

Data Definition Statements

For information on data definition (DDL) statements, see:

ALTER DATABANK

ALTER DATABASE

ALTER FUNCTION

ALTER IDENT

ALTER METHOD

ALTER PROCEDURE

ALTER ROUTINE

ALTER SEQUENCE

ALTER SHADOW

ALTER STATEMENT

ALTER TABLE

ALTER TYPE

COMMENT

CREATE COLLATION

CREATE DATABANK

CREATE DOMAIN

CREATE FUNCTION

CREATE IDENT

CREATE INDEX

CREATE MODULE

CREATE PROCEDURE

CREATE SCHEMA

CREATE SEQUENCE

CREATE SHADOW

CREATE STATEMENT

CREATE SYNONYM

CREATE TABLE

CREATE TRIGGER

CREATE VIEW

DROP.

Declarative Statements

Declarative statements, denoted as declarative-statement in syntax diagrams, include the following statements:

DECLARE CONDITION

DECLARE CURSOR

DECLARE HANDLER

DECLARE VARIABLE.

Embedded SQL Statements

Embedded SQL statements include the following statements:

ALLOCATE CURSOR

ALLOCATE DESCRIPTOR

DEALLOCATE DESCRIPTOR

DEALLOCATE PREPARE

DESCRIBE

EXECUTE

EXECUTE IMMEDIATE

GET DESCRIPTOR

PREPARE

SET DESCRIPTOR.

Embedded SQL Control Statements

Embedded SQL control statements include the following statements:

DECLARE SECTION

WHENEVER.

Procedural SQL Statements

Procedural SQL statements (including DML), denoted procedural-sql-statement in syntax diagrams, include the following statements:

CALL

CASE

CLOSE

COMMIT

COMPOUND STATEMENT

DELETE CURRENT

DELETE

EXECUTE STATEMENT

FETCH

FOR

GET DIAGNOSTICS

IF

INSERT

ITERATE

LEAVE

LOOP

OPEN

REPEAT

RESIGNAL

RETURN

ROLLBACK

SELECT INTO

SELECT

SET SESSION

SET TRANSACTION

SET

SIGNAL

START

UPDATE CURRENT

UPDATE

WHILE.

System Administration Statements

System administration statements include the following statements:

ALTER DATABANK RESTORE

CREATE BACKUP

DELETE STATISTICS

SET DATABANK

SET DATABASE

SET SHADOW

UPDATE STATISTICS.

Usage Modes

The following usage modes apply for SQL statements in Mimer SQL:

Embedded

You can embed the statement in an embedded SQL application.

Interactive

You can use the statement in interactive SQL tools such as Mimer BSQL and DbVisualizer.

JDBC

You can use the statement via the Java Database Connectivity (JDBC) interface.

Module

You can embed the statement in a Module SQL application.

ODBC

You can use the statement via the Microsoft Open Database Connectivity (ODBC) interface.

Procedural

You can use the statement in a function, procedure, trigger or method.