Embedding SQL statements in a host language
Structured Query Language
(SQL) is a standardized language that you can use to manipulate database
objects and the data that they contain. Despite differences between
host languages, embedded SQL applications are made up of three main
elements that are required to setup and issue an SQL statement.
The elements you must create when you write an embedded SQL application
include:
- A DECLARE SECTION for declaring host variables. The declaration of the SQLCA structure does not need to be in the DECLARE section.
- The main body of the application, which consists of the setup and execution of SQL statements.
- Placements of logic that either commit or rollback the changes made by the SQL statements.