SQL DBMSs communicate with SQL applications through a common programming language interface that is invoked through one of the SQL Standard-defined binding styles, or interface options. The programming language used is called a host language. An SQL DBMS must support the use of at least one host language, either for embedded SQL programming or for invoking external routines and/or procedures.
-
SQL Binding Styles
There are three main binding styles: With embedded SQL, you can put SQL sta... -
What is Embedded SQL?
Embedded SQL was once the predominant standard way to mix SQL statements wi... -
Precompilers
Most precompilers are standalone utility programs. A few are integrated wit... -
SQL Prefixes and Terminators
The precompiler lacks the smarts to figure out the syntax of the host langu... -
Host Variables
Embedded SQL statements can contain host language variables in the same pla... -
Cursors
The most famous of the impedance-mismatch problems is that SQL operates on ... -
DECLARE CURSOR Statement
The DECLARE CURSOR statement defines a Cursor. The required syntax for the ... -
OPEN Statement
The OPEN statement opens a Cursor. The required syntax for the OPEN stateme... -
FETCH Statement
The FETCH statement positions a Cursor on a specific row of its result Tabl... -
Singleton SELECT Statement
If you know that a result Table will contain only one row of SQL-data, you ... -
INSERT Statement
A special form of the INSERT statement exists for use with a Cursor. The re... -
Positioned UPDATE statement
The positioned UPDATE statement lets you UPDATE the Cursor's current row. T... -
Positioned DELETE Statement
The positioned delete statement lets you DELETE the Cursor's current row. T... -
CLOSE Statement
The CLOSE statement closes a Cursor. The required syntax for the CLOSE stat... -
Embedded SQL Examples
Here is an example program which selects and fetches ten rows in Table T, a... -
Diagnostics
"I beseech you in the bowels of Christ, consider that you may be wrong." — ... -
WHENEVER Statement
The required syntax for the WHENEVER statement (omitting some details) is: ... -
GET DIAGNOSTICS Statement
The GET DIAGNOSTICS statement gets exception or completion condition inform... -
Dynamic SQL
In the examples so far, we've assumed that we know some things in advance a... -
Summary
An embedded SQL host language program is an application program that contai... -
Dialects
Embedded SQL is well specified by part five of the SQL Standard: ISO/IEC 90...