SQL/MP Reference Manual
HP NonStop SQL/MP Reference Manual—523352-013
S-73
Statements
Statements
SQL/MP statements define SQL objects and catalogs, manipulate data within those
objects and catalogs, and control various aspects of the processes that perform the
data definition and manipulation you specify in the statements.
A single SQL/MP statement can contain up to 32,767 single-byte characters, including
spaces. A tab is considered the same as a space in SQL/MP statements.
You can enter and execute most SQL/MP statements either from SQLCI or from an
embedded SQL program. (SQLCI commands, in contrast to SQL/MP statements, can
be entered only from SQLCI.)
Each SQL statement must end with a terminator that is not shown in the statement
description because it depends upon the host language. The terminator for SQL
statements in SQLCI, C, Pascal, and TAL is a semicolon (;). The terminator in COBOL
is END EXEC.
For more information about entering SQL statements in SQLCI, see SQLCI on
page S-60 and SQLCI Commands on page S-63. For general information about
embedded SQL programs, see Embedded SQL on page E-2 or, for more information,
see the SQL/MP programming manual for a specific language.
Table S-4 on page S-77 summarizes the SQL/MP statements and directives. (A
directive is a statement that gives instructions to a compiler.) Statements that can be
used only in programs are indicated with an asterisk (*) following the statement name.
For more information about a specific statement listed in the summary, see the entry
for that statement.
Table S-3. Summary of SQL Statements
Command Action
ALTER CATALOG Statement
Alters security for a catalog
ALTER COLLATION Statement
Renames or alters security for a collation
ALTER INDEX Statement
Renames, adds, or drops partitions, or alters security or
other attributes of an index
ALTER PROGRAM Statement
Renames or alters security of an SQL program in a
Guardian file
ALTER TABLE Statement
Renames, alters security or file attributes, or enables or
disables similarity checks for a table. Also adds columns
to a table and adds, drops, or moves partitions of a table.
ALTER CATALOG Statement
Alters security for a catalog
ALTER COLLATION Statement
Renames or alters security for a collation
ALTER INDEX Statement
Renames, adds, or drops partitions, or alters security or
other attributes of an index
* Can be used only in program