This manual is a language reference for the SAND CDBMS implementation of Structured Query Language (SQL), the relational database language used to create, manage, and manipulate information in a SAND database. The manual provides detailed functional and syntactical information on all the SQL statements supported by SAND CDBMS. SAND CDBMS SQL statements may be executed interactively using the SAND CDBMS Interactive SQL utility (nisqlm) or other front-ends.
SAND CDBMS SQL is a subset of the ISO/ANSI SQL92 specification.
The standard SQL statements supported by SAND CDBMS are divided into three functional command categories:
- Data Definition Language (DDL) statements create, alter, rename, and drop relational database objects such as databases, schemas, domains, and tables, as well as grant and revoke privileges on those database objects.
- Data Manipulation Language (DML) statements retrieve, update, insert, and delete data values within relational database tables.
- Data Control Language (DCL) statements establish system security by controlling access to data objects, plus regulating concurrency and transaction processing.
In SAND CDBMS, Data Manipulation and Data Definition statements can be executed within the same transaction.
Interpreting Syntax DiagramsThe following conventions are used in the syntax diagrams:
- UPPERCASE letters indicate keywords (for example, INSERT). Keywords must be spelled exactly as presented, but are not case-sensitive, except where noted.
- Italicized words represent variables or arguments (for example, table-name.column-name) for which the user must substitute database object names or data values. In usage, these are only case-sensitive where specifically indicated.
- Non-italicized words or phrases between angle brackets ( < > ) indicate that the syntax is expanded in a subsequent diagram labeled with the same word or phrase. When uppercase keywords are followed by the word �statement� (for example, <SELECT statement>), the syntax element is another SQL command statement entirely, and should be replaced by the appropriate syntax diagram.
- Partial diagrams are labeled with a word or phrase in the upper-left corner. These named diagrams should be substituted for the word or phrase wherever it is referenced in another syntax diagram.
- Parentheses ( ) appearing within the statement syntax are part of the syntax, and must be typed as shown. Punctuation marks such as commas ( , ) and colons ( : ) must be entered literally wherever they appear in syntax diagrams. Mathematical symbols, such as plus signs ( + ) and multiplication operators ( * ), must also be entered literally.
- Underlined items indicate a default option. For example, if the options for SELECT are ALL and DISTINCT, SELECT by itself is the equivalent of SELECT ALL.
Required elements such as invocation commands and required arguments appear on the main path of the syntax diagram. A vertical bar signals the end of the syntax diagram, whereas an arrow signals continuation.
Optional elements appear below the main path of the syntax diagram.
If there are multiple choices for a required element, one of the elements will be displayed on the main path of the diagram.
An arrow appears below a syntax element (or list of optional elements) when more than one element may be entered or when a particular element may be repeated. If the elements in the list must be separated by commas, a comma is shown in the syntax box.
Elements that are expanded in a subsequent syntax diagram are labeled with a word or phrase between angle brackets. The partial diagram that expands the element is labeled in the top left corner with the same word or phrase found between angle brackets in the preceding diagram.
Usage examples at the end of each statement description are shown in SAND CDBMS Interactive SQL. In SAND CDBMS Interactive SQL, statements must be terminated with a semicolon ( ; ).