The SET SCHEMA statement sets the default schema for a connection's session to the designated schema. The default schema is used as the target schema for all statements issued from the connection that do not explicitly specify a schema name.
The target schema must exist for the SET SCHEMA
statement to succeed. If the schema doesn't exist an error is returned. See
The SET SCHEMA statement is not transactional: If the SET SCHEMA statement is part of a transaction that is rolled back, the schema change remains in effect.
USER is the current user. If no current user is defined, the current schema defaults the APP schema. (If a user name was specified upon connection, the user's name is the default schema for the connection, if a schema with that name exists.)
? is a dynamic parameter specification that can be used in prepared statements. The SET SCHEMA statement can be prepared once and then executed with different schema values. The schema values are treated as string constants so they are case sensitive. For example, to designate the APP schema, use the string "APP" rather than "app".