|
|
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:
SELECTretrieves dataINSERTadds new rows to tablesUPDATEchanges data in existing rowsDELETEdeletes dataCALLexecutes proceduresSETvalue assignment.Connection Statements
Connection statements are used to connect and disconnect user and program idents to or from the database. For example:
CONNECTconnects a user ident to the databaseDISCONNECTdisconnects a user ident from the databaseSET CONNECTIONchanges the active database connectionENTERenters aPROGRAMidentLEAVEleaves aPROGRAMident.Transaction Control Statements
Transaction control statements are used to control when database transactions begin and end, and when updates take effect. For example:
SET TRANSACTIONsets transaction options for subsequent transactionsSET SESSIONsets the default transaction options for the sessionSTARTstarts a transaction build-upCOMMITcommits the current transactionROLLBACKabandons 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 BACKUPcreates a backup copy of a databank, with an optional incremental backup. Incremental backups may also be taken on their own with the statementCREATE INCREMENTAL BACKUPALTER DATABANK, theRESTOREvariant of this statement recovers a databank from incremental backup informationSET DATABASEsets the databaseONLINEorOFFLINESET DATABANKsets a databankONLINEorOFFLINESET SHADOWsets one or more shadowsONLINEorOFFLINEUPDATE STATISTICSupdates the statistical information used for query optimization.DELETE STATISTICSdeletes the statistical information.
|
Mimer Information Technology AB Voice: +46 18 780 92 00 Fax: +46 18 780 92 40 info@mimer.se |
|
|