Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Dynamic SQL

SESAM/SQL allows you to generate SQL statements and cursor descriptions dynamically during execution of an ESQL program. The concepts and language resources involved in this are referred to by the term dynamic SQL and are described in this section.

A dynamic statement (or cursor description) does not have to be known when a program is compiled. Instead, it can be constructed dynamically when the program is executed and is made available in a host variable.

A routine (see chapter "Routines") may not contain any dynamic SQL statements or cursor descriptions.

Placeholder

You cannot use host variables in a dynamic SQL statement (or cursor description). Instead, you use question marks as placeholders for unknown input values. The rules governing placeholders are described in the "PREPARE - Prepare dynamic statement".