The SQL Command and Statements
The SQL command
SQL statements can be tested while logged on to Reality by using the SQL TCL command:
SQL sql_statement {(options}
Options
C Turns on the COUNT option (similar to English).
D8 Displays optimisation decisions.
O Turns all SQL optimisation off.
S Turns off sort optimisation.
T Turns off table access optimisation (item-id and index optimisation).
V Displays the version numbers of the SQL server and compiler.
W Turns off multi-table WHERE clause optimisation.
SQL Statements
The following statements are currently supported by Reality. Detailed descriptions of these statements are provided following the lists. The syntax of the SQL search condition element and SQL numeric expression element is described independently.
Creating, Deleting and Updating Tables
-
Adds columns to an existing table.
-
Creates an SQL table, defining columns and constraints.
-
Deletes an SQL table.
Creating, Deleting and Updating Indexes
-
Creates an index on specified columns in an SQL table.
-
Deletes an index in an SQL table.
Retrieving Information From a Table
-
Lists rows from a table.
Granting and Revoking Privileges
-
Gives privileges for a particular table to users.
-
Revokes privileges for a particular table to users. Reverses the action of the GRANT command.
Inserting, Deleting and Updating Rows
-
Adds new rows Into a table.
-
Removes rows from a table.
-
Updates rows in a table.
Verifying a Table
-
Checks that table data matches the specified data type for each column.