This is an old revision of the document!
Overview | Commands | Options | Command-line | Command Files
The following commands are available in OdxSQL:
Attach a database
ATTACH DATABASE database [AS alias] FROM filename [ON [INSTANCE] instance] [WITH options]
* Attach a segment
* ATTACH <INDEX | DATA> SEGMENT segment [PHYSICAL physical]
[ON [INSTANCE] instance] [WITH options]
* Attach a table
* ATTACH TABLE table [PHYSICAL “physical”] (column [, column …])
[ON [INSTANCE] instance>] [WITH options] column: column-name datatype (length)
Perform performance benchmarks
BENCHMARK [<table | select-statement>] [WITH options]
Perform basic calculator functions
CALC expression
Change directories
CD [path]
* Close a cursor
* CLOSE CURSOR [NODE node] TYPE type [attribute [attribute ...
* Create an environment file
* CREATE ENVIRONMENT environment [attribute [attribute …]]
[node [node ...]] IN "filename" [WITH options] node: [NODE node] [attribute [attribute ...]]
* Create an index or index group
* CREATE <OMNIDEX | QUICKTEXT | FULLTEXT | CUSTOM | NATIVE> INDEX
[[(owner)]table.]index [ON table] (<column | substring> [, <column | substring> ...])] [attribute [attribute ...]] IN "filename" [WITH options] CREATE INDEX GROUP [(owner)]group (table.index [, table.index ...])] IN "filename" [WITH options]
* Create a segment
* CREATE [<TEMPORARY | PERMANENT>] <INDEX | DATA> SEGMENT segment
[PHYSICAL physical] [AS (select)] [ON [CURSOR] cursor] [WITH options]
* Create a table
* CREATE [<[<GLOBAL | LOCAL>] TEMPORARY | PERMANENT>] TABLE table
[PHYSICAL "physical"] (column [, column ...]) [<IN "filename" | ON [INSTANCE] instance>] [WITH options] column: column-name datatype (length)
Show the current date and time
DATE
* Issue an SQL delete statement
* DELETE FROM table [WHERE < predicate-list | CURRENT>
[<ON | OF> [CURSOR] cursor]] [WITH options]
* Detach a previously attached database
* DETACH DATABASE database [ON [INSTANCE] instance] [WITH options]
* Detach a previously attached segment
* DETACH SEGMENT segment [ON [INSTANCE] instance] [WITH options]
* Detach a previously attached table
* DETACH TABLE table [ON [INSTANCE] instance] [WITH options]
Display a directory of files
DIR fileset [WITH options]
* Disconnect from an environment file
* DISCONNECT [ALL] ON [INSTANCE instance] [WITH options]
* Drop a database
* DROP DATABASE [IF EXISTS] database IN “filename” [WITH options]
* Drop an environment
* DROP ENVIRONMENT [IF EXISTS] [environment] IN “filename” [WITH options]
Quit Omnidex SQL
QUIT
Register a license code
REGISTER LICENSE license_code [FOR company]
Register an ODBC driver
REGISTER ODBC [dir]
Request a license code
REQUEST [<ENTERPRISE | DEVELOPER | TRIAL>] LICENSE [FOR COMPANY "company" CONTACT "contact" PHONE "phone" EMAIL "email"]
Reset history of ODXSQL commands
RESET HISTORY
Reset the cumulative timer
RESET TIMER
Restore settings, optionally from a file
RESTORE SETTINGS [[FROM] filename] [WITH options]
Save commands to file
SAVE HISTORY [[TO] filename] [WITH options]
Save settings, optionally to a file
SAVE SETTINGS [[TO] filename] [WITH options]
* Issue an SQL select statement
* SELECT statement [ON [CURSOR] cursor] [WITH options]
Set an option
SET [<option | ?>] [ON <INSTANCE | CURSOR> n]
* Set an environment variable
* SETENV variable value
Describe an object
SHOW <ENVIRONMENT [environment] | DATABASE database | TABLE table | COLUMN column> [ON [INSTANCE] instance] [WITH options] SHOW [<USER_ | DATA_ | METADATA_ | SYSTEM_ | ALL_>] <DATABASES | TABLES | COLUMNS> [ON [INSTANCE] instance] [WITH options] SHOW ALL [database] [ON [INSTANCE] instance] [WITH options] SHOW <INSTANCE | CURSOR> [object] [WITH options] SHOW LICENSE SHOW <CONNECTIONS | STATEMENTS>
Transfer a license to another server
TRANSFER LICENSE
Unregister an ODBC driver
UNREGISTER ODBC
* Issue an SQL update statement
* UPDATE table SET column-assignments
[WHERE <predicate-list | CURRENT> [<ON | OF> [CURSOR] cursor]] [WITH options]
* Update Omnidex indexes
* UPDATE INDEXES [FOR <ENVIRONMENT [environment] | DATABASE database |
TABLE table | COLUMN table.column | INDEX table.index>] [ON [INSTANCE] instance] [WITH options]
* Update rollup table
* UPDATE ROLLUP TABLE table [ON [INSTANCE] instance] [WITH options]
* Update rollup tables
* UPDATE ROLLUPS [FOR <ENVIRONMENT [environment] | DATABASE database |
TABLE table>] [ON [INSTANCE] instance] [WITH options]
* Update statistical information
* UPDATE STATISTICS [FOR <ENVIRONMENT [environment] | DATABASE database |
TABLE table | COLUMN table.column | INDEX table.index>] [ON [INSTANCE] instance] [WITH options]
* Update textual statistics
* UPDATE TEXT [FOR <ENVIRONMENT [environment] | DATABASE database |
TABLE table | COLUMN table.column | INDEX table.index>] [ON [INSTANCE] instance] [WITH options]
Execute a file of ODXSQL commands
USE filename [WHERE criteria] [WITH options] criteria: SQL syntax referencing SECTION, TEST and/or LINE
Validate an environment
VALIDATE [<ENVIRONMENT [environment] | DATABASE database | TABLE table>] [ON [INSTANCE] instance] [WITH options]
Execute a shell command
!<shell command> or ! for interactive shell
Execute last command
<. | command number>
Comment line
; [<directive [directive ...]>] text <SUSPEND> <RESUME> <VERBOSE> <QUIET> <COMMON> <END_COMMON> <SECTION> <END_SECTION> <TEST> <END_TEST>
Execute numbered command
n (where n is a number from the command history)
See also: