Mimer SQL Statements
Mimer SQL is a language made up of a number of different statements, which may be divided into the following basic categories:
- Data definition statements
- Access Control Statements
- Data manipulation statements
- Connection statements
- Transaction control statements
- Database administration statements
The SQL statements are described in detail in subsequent chapters of this manual and in the Mimer SQL Reference Manual, SQL Statement Descriptions.
In addition, there is a set of commands specific to the BSQL environment, for managing output formatting and so on, see Mimer BSQL.
Note: In Mimer BSQL, statements are terminated by a semicolon (;). This is not part of the SQL statement syntax, but is included in the examples in this manual.
Data Definition Statements
Data definition statements are used to maintain objects in a database. For example:
Access Control Statements
Access Control Statements are used to manage privileges. For example:
Data Manipulation Statements
Data manipulation statements are used to examine and change data in the database. For example:
- SELECT retrieves data
- INSERT adds new rows to tables
- UPDATE changes data in existing rows
- DELETE deletes data
- CALL executes routines
- SET value assignment.
Connection statements are used to connect and disconnect user and program idents to or from the database. For example:
- CONNECT connects a user ident to the database
- DISCONNECT disconnects a user ident from the database
- SET CONNECTION changes the active database connection
- ENTER enters a PROGRAM ident
- LEAVE leaves a PROGRAM ident.
Transaction Control Statements
Transaction control statements are used to control when database transactions begin and end, and when updates take effect. For example:
- SET TRANSACTION sets transaction options for subsequent transactions
- SET SESSION sets the default transaction options for the session
- START starts a transaction build-up
- COMMIT commits the current transaction
- ROLLBACK abandons the current transaction.
Database Administration Statements
Database administration statements are used to manage backup/restore operations and the statistical information used to optimize queries. For example:
- CREATE BACKUP creates a backup copy of a databank, with an optional incremental backup. Incremental backups may also be taken on their own with the statement CREATE INCREMENTAL BACKUP
- ALTER DATABANK, the RESTORE variant of this statement recovers a databank from incremental backup information
- SET DATABASE sets the database ONLINE or OFFLINE
- SET DATABANK sets a databank ONLINE or OFFLINE
- SET SHADOW sets one or more shadows ONLINE or OFFLINE
- UPDATE STATISTICS updates the statistical information used for query optimization. DELETE STATISTICS deletes the statistical information.
Mimer Information Technology AB
Voice: +46 18 780 92 00
Fax: +46 18 780 92 40