The CURRENT SCHEMA special register specifies the schema name used to qualify unqualified database object references in dynamically prepared SQL statements.
The data type is VARCHAR(128).
For information on when the CURRENT SCHEMA is used to resolve unqualified names in dynamic SQL statements and the effect of its value, see Qualification of unqualified object names.
The CURRENT SCHEMA special register contains a value that is a single identifier without delimiters.
The value of the special register can be changed by executing the SET SCHEMA statement. The value of CURRENT SCHEMA is the same as the value of CURRENT SQLID unless a SET SCHEMA statement has been issued specifying a different value. After a SET SCHEMA statement has been issued in an application, the values of CURRENT SCHEMA and CURRENT SQLID are separate. Therefore, if the value of CURRENT SCHEMA needs to be changed, a SET SCHEMA statement must be issued.
Specifying CURRENT_SCHEMA is equivalent to specifying CURRENT SCHEMA.
SET SCHEMA = 'D123'