23.10.2012 Views

Openedge Data Management: SQL Reference - Product ...

Openedge Data Management: SQL Reference - Product ...

Openedge Data Management: SQL Reference - Product ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

SET SCHEMA<br />

Syntax<br />

SET SCHEMA<br />

• When logging commences to a new file, the file contents begin with information about the<br />

<strong>SQL</strong> Server environment, including:<br />

– Environment variable settings<br />

– Parameter values passed to the server at startup<br />

– Logging control values (such as size limits)<br />

– The <strong>SQL</strong> Server process ID.<br />

• Each section of information written to the log file begins with the string<br />

DDMMMYYYY HH:MM:SS :<br />

For example, 19AUG2005 12:00:00 1:<br />

Sets the default owner, also known as schema, for unqualified table references.<br />

'string_literal'<br />

?<br />

SET SCHEMA { 'string_literal' | ? | USER }<br />

USER<br />

Specifies the name for the default owner as a string literal, enclosed in single or double<br />

quotes.<br />

Indicates a parameter marker to contain the default owner. The actual replacement value<br />

for the owner name is supplied in a subsequent <strong>SQL</strong> operation.<br />

Directs the database to set the default owner back to the username that established the<br />

session.<br />

Example This example sets the default schema name to White:<br />

SET SCHEMA 'White' ;<br />

COMMIT ;<br />

SELECT * from customer ;<br />

Subsequent <strong>SQL</strong> statements with unqualified table references will use the owner name White.<br />

The SELECT statement in this example returns all rows in the ‘White.customer’ table. The<br />

username establishing the original session is still the current user.<br />

Notes • For authorization purposes, invoking SET SCHEMA does not change the username<br />

associated with the current session.<br />

61

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!