Progress
SQL-92
Guide and Reference


SET SCHEMA Statement

Sets the default owner, also known as schema, for unqualified table references.

SYNTAX

SET SCHEMA { 'string_literal' | ? | :host_var | USER  } 

'string_literal'

Specifies the name for the default owner as a string literal, enclosed in single or double quotes.

?

Indicates a parameter marker to contain the default owner. The actual replacement value for the owner name is supplied in a subsequent SQL-92 operation.

:host_var

Host variable reference declared in a DECLARE SECTION. The SET SCHEMA :host_var option is valid only in an embedded SQL-92 program.

USER

Directs the database to set the default owner back to the username that established the session.

EXAMPLE

This example sets the default schema name to 'White'. Subsequent SQL-92 statements with unqualified table references will use the owner name 'White'. The SELECT statement in this example returns all rows in the 'White.customer' table. The username establishing the original session is still the current user.

SET SCHEMA 'White' ; 
COMMIT ; 
  
SELECT * from customer ; 

NOTES

AUTHORIZATION

None

SQL COMPLIANCE

SQL-92

ENVIRONMENT

Embedded SQL, interactive SQL, ODBC applications, JDBC applications

RELATED STATEMENTS

None


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095