SQL Statements

ALTER TABLE Statement

The ALTER TABLE statement changes a table definition.
alter table statement ::=
    ALTER TABLE table spec
    { { ADD|MODIFY|ALTER [ COLUMN ] column def list } |
      { DROP [ COLUMN ] column name list }
    }+ ';'

ASYNC OPERATION Statement

The ASYNC OPERATION statement controls the begin and end of asynchronous processing.
async operation statements ::= { BEGIN | END } ASYNC OPERATION ';'  

CONNECT Statement

The CONNECT statement creates a pass-through connection.
connect statement ::=
    CONNECT TO libref name [ [ AS ]
    alias name ] '('
    dbms options ')' ] ';'

COPY TABLE Statement

Use the COPY TABLE statement to copy tables.
copy table statement ::=
    COPY TABLE table spec FROM
    table spec [ WITHOUT INDEXES ] [ORDER BY
    column name
    [ ASC | DESC ] [','
    column name [ ASC | DESC ]]] ';'

CREATE INDEX Statement

The CREATE INDEX statement creates an index on a table.
create index statement ::=
    CREATE [ UNIQUE ] INDEX index name ON
    table spec '(' column name list ')' ';'

CREATE MATERIALIZED VIEW Statement

Use the CREATE MATERIALIZED VIEW statement to create a materialized view of a table.
create materialized view statement ::= CREATE MATERIALIZED VIEW
table spec AS
select spec ';'

CREATE TABLE Statement

The CREATE TABLE statement creates a table definition.
create table statement ::=
    CREATE TABLE table spec
    { '(' column def list ')' | AS
select spec | LIKE
table spec } ';'

CREATE VIEW Statement

The CREATE VIEW statement creates a view on one or more tables.
create view statement ::= CREATE VIEW
table spec AS
select spec ';'
 

DELETE Statement

The DELETE statement deletes records.
delete statement ::= DELETE FROM
table spec [
where clause ] ';'

DESCRIBE TABLE Statement

The DESCRIBE TABLE statement describes a table definition.
describe table statement ::=
    DESCRIBE TABLE table spec [ [',']
    table spec ]* ';'

DESCRIBE VIEW Statement

The DESCRIBE VIEW statement describes a view definition.
describe view statement ::=
    DESCRIBE VIEW table spec [ [',']
    table spec ]* ';'

DISCONNECT Statement

The DISCONNECT statement is a pass-through statement.
disconnect statement ::= DISCONNECT FROM
libref name ';'

DROP INDEX Statement

The DROP INDEX statement drops an index from a table.
drop index statement ::=
    DROP INDEX index name [ [',']
    index name ]* FROM
    table spec ';'

DROP TABLE Statement

The DROP TABLE statement drops a table definition.
drop table statement ::= DROP TABLE
table spec [ [',']
table spec ]* ';'

DROP VIEW Statement

The DROP VIEW statement drops a view definition.
drop view statement ::=
    DROP VIEW table spec [ [',']
    table spec ]* ';'

EXECUTE Statement

The EXECUTE statement is a pass-through statement.
execute statement ::= EXECUTE '('
passthru spec ')' BY
libref name ';'

INSERT Statement

The INSERT statement adds records.
insert statement ::=
    INSERT INTO table spec [ '('
    column name list ')' ]
    insert source ';'

LIBREF Statement

Use the libref statement to assign LIBNAME domains for the SQL server.
LIBREF statement ::=
    LIBREF libref name [ ENGNAME '='
    identifier ] [ ENGOPT '='
    string ] ';'

LOAD TABLE Statement

Use the LOAD TABLE statement to specify a table to load.
load table statement ::=
    LOAD TABLE table spec [ WITH
    with index spec [ ','
    with index spec ]* ]
    AS select spec ';'

RESET Statement

The RESET statement resets session options and flags.
set option statement ::=
    { SET OPTION  | RESET }
    { identifier
 [ '=' { constant |
identifier |
truth value
| DEFAULT } ] }+

SELECT Statement

The SELECT statement retrieves information.
select statement::=
select spec ';'

TRUNCATE TABLE Statement

The TRUNCATE TABLE statement drops a table definition.
truncate teble statement::= TRUNCATE TABLE
table spec [ [',']
table spec ]* ';'

UPDATE Statement

The UPDATE statement updates records.
update statement ::=
    UPDATE table spec
    SET column name '='
scalar expr [ ','
column name '='
scalar expr ]*
    [ where clause ] ';'

VALIDATE Statement

The VALIDATE statement validates a given SELECT specification.
validate statement ::= VALIDATE
select spec ';'