SQL/MP Programming Manual for C
Introduction
HP NonStop SQL/MP Programming Manual for C—429847-008
1-3
Embedding SQL/MP Statements and Directives
Embedding SQL/MP Statements and Directives 
Table 1-1 lists the SQL/MP statements and directives you can embed in a C program. 
Precede an embedded SQL statement or directive with the EXEC SQL keywords and 
terminate it with a semicolon (;).
Table 1-1. SQL/MP Statements and Directives
Type Statement or Directive 
Data Declaration  BEGIN DECLARE SECTION and END DECLARE SECTION
INVOKE 
INCLUDE STRUCTURES
INCLUDE SQLCA, INCLUDE SQLDA, and INCLUDE SQLSA 
Data Definition 
Language (DDL) 
ALTER CATALOG, ALTER COLLATION, ALTER INDEX, ALTER 
PROGRAM, ALTER TABLE, and ALTER VIEW 
COMMENT
CREATE CATALOG, CREATE COLLATION, CREATE INDEX, 
CREATE PROGRAM, CREATE TABLE, and CREATE VIEW 
DROP 
HELP TEXT 
UPDATE STATISTICS
Data Manipulation 
Language (DML) 
DECLARE CURSOR
OPEN 
FETCH
SELECT, INSERT, UPDATE, DELETE
CLOSE
Data Status 
Language (DSL) 
GET CATALOG OF SYSTEM 
GET VERSION (for SQL/MP software, catalogs, and objects) 
GET VERSION OF PROGRAM 
Dynamic SQL 
Operations
PREPARE 
DESCRIBE and DESCRIBE INPUT
EXECUTE and EXECUTE IMMEDIATE 
RELEASE 
Error Processing  WHENEVER 
Transaction Control BEGIN WORK, COMMIT WORK, and ROLLBACK WORK










