SQL/MX Programming Manual for C and COBOL (G06.24+, H06.03+)
Embedded SQL Statements
HP NonStop SQL/MX Programming Manual for C and COBOL—523627-004
2-10
Embedded SQL Declarations and Statements
Data Manipulation Language (DML) Statements 
CLOSE Closes a cursor.
DELETE  Deletes rows from a table or view.
FETCH  Retrieves a row by using a cursor.
INSERT Inserts rows into a table or view.
OPEN Opens a cursor.
SELECT Retrieves data from tables and views.
UPDATE Updates values in columns of a table or 
view.
BEGIN...END Designates a compound statement that 
groups other embedded SQL statements 
together.
Transaction Control Statements 
BEGIN WORK* Starts a TMF transaction.
COMMIT [WORK] Commits all changes made to the database 
during the current transaction and frees any 
resources.
ROLLBACK [WORK]  Backs out the current transaction and frees 
resources.
SET TRANSACTION  Sets attributes for the next transaction—
isolation level, access mode, size of 
diagnostics area, and whether to commit 
changes automatically at the end of a 
statement.
Object Naming Statements 
SET CATALOG Sets default catalog for unqualified schema 
names in dynamic SQL statements that are 
prepared after this statement is executed.
SET SCHEMA  Sets default schema for unqualified object 
names in dynamic SQL statements that are 
prepared after this statement is executed.
SET NAMETYPE* Sets default NAMETYPE attribute value to 
ANSI or NSK in dynamic SQL statements 
that are prepared after this statement is 
executed.
Table 2-4. Executable SQL Statements  (page3of5)
Statement Description
* Indicates the statement is an SQL/MX extension.










