IBM Books

Application Development Guide


Embedding SQL Statements

Embedded SQL statements consist of the following three elements:

Element
Correct Syntax

Statement initializer
EXEC SQL

Statement string
Any valid SQL statement

Statement terminator
semicolon (;)

For example:

     EXEC SQL SELECT col INTO :hostvar FROM table;

The following rules apply to embedded SQL statements:


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]

[ DB2 List of Books | Search the DB2 Books ]