This shows you the differences between two versions of the page.
programs:odxsql:commands [2015/06/10 18:51] doc |
programs:odxsql:commands [2016/06/28 22:38] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | {{page>:top_add&nofooter&noeditbtn}} | ||
- | |||
- | |||
- | ====== Programs: OdxSQL ====== | ||
- | |||
- | [[programs:odxsql:home|Overview]] | **[[programs:odxsql:commands|Commands]]** | [[programs:odxsql:options|Options]] | [[programs:odxsql:cmdline|Command-line]] | [[programs:odxsql:files|Command Files]] | ||
- | |||
- | |||
- | ---- | ||
- | |||
- | |||
- | ===== Commands ===== | ||
- | |||
- | The following commands are available in OdxSQL: | ||
- | |||
- | |||
- | ==== ATTACH DATABASE ==== | ||
- | |||
- | Attach a database | ||
- | |||
- | <code> | ||
- | ATTACH DATABASE database [AS alias] FROM filename [ON [INSTANCE] instance] | ||
- | [WITH options] | ||
- | </code> | ||
- | |||
- | ==== ATTACH SEGMENT ==== | ||
- | |||
- | Attach a segment | ||
- | |||
- | <code> | ||
- | ATTACH <INDEX | DATA> SEGMENT segment [PHYSICAL physical] | ||
- | [ON [INSTANCE] instance] [WITH options] | ||
- | </code> | ||
- | |||
- | ==== ATTACH TABLE ==== | ||
- | |||
- | Attach a table | ||
- | |||
- | <code> | ||
- | ATTACH TABLE table [PHYSICAL "physical"] (column [, column ...]) | ||
- | [ON [INSTANCE] instance>] [WITH options] | ||
- | column: column-name datatype (length) | ||
- | </code> | ||
- | |||
- | ==== BENCHMARK ==== | ||
- | |||
- | Perform performance benchmarks | ||
- | |||
- | <code> | ||
- | BENCHMARK [<table | select-statement>] [WITH options] | ||
- | </code> | ||
- | |||
- | ==== CALC ==== | ||
- | |||
- | Perform basic calculator functions | ||
- | |||
- | <code> | ||
- | CALC expression | ||
- | </code> | ||
- | |||
- | ==== CD ==== | ||
- | |||
- | Change directories | ||
- | |||
- | <code> | ||
- | CD [path] | ||
- | </code> | ||
- | |||
- | ==== CLOSE CURSOR ==== | ||
- | |||
- | Close a cursor | ||
- | |||
- | <code> | ||
- | CLOSE CURSOR [[ON] CURSOR] cursor] [WITH options] | ||
- | </code> | ||
- | |||
- | ==== CONNECT ==== | ||
- | |||
- | Connect to an environment file | ||
- | |||
- | <code> | ||
- | CONNECT [TO] connection_string [USING api] [WITH options] | ||
- | Connection string syntax: | ||
- | [ host:port:pool ] filename [ node ] &options | ||
- | Examples: | ||
- | CONNECT example.xml | ||
- | CONNECT [server1:7555]example.xml | ||
- | CONNECT [server1:7555:pool1] | ||
- | </code> | ||
- | |||
- | ==== CONVERT ==== | ||
- | |||
- | Export a file with data conversions | ||
- | |||
- | <code> | ||
- | CONVERT [statement TO filename [ON [CURSOR] cursor] [WITH options] | ||
- | </code> | ||
- | |||
- | ==== CREATE DATABASE ==== | ||
- | |||
- | Create a database | ||
- | |||
- | <code> | ||
- | CREATE DATABASE database node [node ...] IN "filename" [WITH options] | ||
- | </code> | ||
- | |||
- | ==== CREATE ENVIRONMENT ==== | ||
- | |||
- | Create an environment file | ||
- | |||
- | <code> | ||
- | CREATE ENVIRONMENT environment [attribute [attribute ...]] | ||
- | </code> | ||
- | |||
- | ==== CREATE INDEX ==== | ||
- | |||
- | Create an index or index group | ||
- | |||
- | <code> | ||
- | 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] | ||
- | </code> | ||
- | |||
- | |||
- | ==== CREATE SEGMENT ==== | ||
- | |||
- | Create a segment | ||
- | |||
- | <code> | ||
- | CREATE [<TEMPORARY | PERMANENT>] <INDEX | DATA> SEGMENT segment | ||
- | [PHYSICAL physical] [AS (select)] [ON [CURSOR] cursor] | ||
- | [WITH options] | ||
- | </code> | ||
- | |||
- | ==== CREATE TABLE ==== | ||
- | |||
- | Create a table | ||
- | |||
- | <code> | ||
- | CREATE [<[<GLOBAL | LOCAL>] TEMPORARY | PERMANENT>] TABLE table | ||
- | [PHYSICAL "physical"] (column [, column ...]) | ||
- | [<IN "filename" | ON [INSTANCE] instance>] [WITH options] | ||
- | column: column-name datatype (length) | ||
- | </code> | ||
- | |||
- | ==== DATE ==== | ||
- | |||
- | Show the current date and time | ||
- | |||
- | <code> | ||
- | DATE | ||
- | </code> | ||
- | |||
- | ==== DELETE ==== | ||
- | |||
- | Issue an SQL delete statement | ||
- | |||
- | <code> | ||
- | DELETE FROM table [WHERE <predicate-list | CURRENT> | ||
- | [<ON | OF> [CURSOR] cursor]] [WITH options] | ||
- | </code> | ||
- | |||
- | |||
- | |||
- | ===== ===== | ||
- | |||
- | **[[programs:odxsql:home|Prev]]** | **[[programs:odxsql:options|Next]]** | | ||
- | |||
- | ====== Additional Resources ====== | ||
- | |||
- | See also: | ||
- | |||
- | {{page>:programs:see_also&nofooter&noeditbtn}} | ||
- | |||
- | {{page>:bottom_add&nofooter&noeditbtn}} | ||
- | |||
- | |||