Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

Defining default values in dynamic statements

The statement SET CATALOG allows the user to specify a default database name used to qualify simple schema names in dynamically compilable SQL statements.

SET SCHEMA defines a default schema name with used to qualify simple names for tables, integrity constraints and indexes in dynamically compilable SQL statements.

The default database or schema name is derived from the value of an alphanumeric literal or from the value of a host variable with an alphanumeric data type. The database or schema name is valid until the next SET CATALOG or SET SCHEMA statement. It is also possible to set a default database name and schema name together by specifying a qualified schema name in the SET SCHEMA statement.