IBM Books

Application Development Guide


Embedding SQL Statements

Embedded SQL statements consist of the following three elements:

Element
Correct COBOL Syntax

Keyword pair
EXEC SQL

Statement string
Any valid SQL statement

Statement terminator
END-EXEC.

For example:

     EXEC SQL SELECT col INTO :hostvar FROM table END-EXEC.

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 ]