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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

NOCYCLE<br />

CREATE SYNONYM<br />

Indicates that the sequence cannot generate more values after reaching the value assigned<br />

to MAXVALUE (if sequence ascends) or MINVALUE (if sequence descends). The <strong>SQL</strong><br />

sequence generator uses NOCYCLE as the default if CYCLE is not specified.<br />

Example In the following example, a sequence is used to generate unique customer numbers when a new<br />

customer is inserted into the table pub.customer:<br />

CREATE SYNONYM<br />

Syntax<br />

CREATE SEQUENCE pub.customer_sequence<br />

START WITH 100,<br />

INCREMENT BY 1,<br />

NOCYCLE;<br />

Creates a synonym for the specified table, view, or synonym. A synonym is an alias that <strong>SQL</strong><br />

statements can use instead of the name specified when the table, view, or synonym was created.<br />

CREATE [ PUBLIC ] SYNONYM synonym<br />

FOR [ owner_name.] {table_name | view_name | synonym } ;<br />

PUBLIC<br />

Specifies that the synonym is public: all users can refer to the name without qualifying it.<br />

By default, the synonym is private: other users must qualify the synonym by preceding it<br />

with the user name of the user who created it.<br />

Users must have the DBA privilege to create public synonyms.<br />

SYNONYM synonym<br />

Name for the synonym.<br />

FOR [ owner_name.] { table_name | view_name | synonym }<br />

Table, view, or synonym for which <strong>SQL</strong> creates the new synonym.<br />

Example The following example demonstrates the use of the CREATE SYNONYM statement:<br />

CREATE SYNONYM customer FOR smith.customer ;<br />

CREATE PUBLIC SYNONYM public_suppliers FOR smith.suppliers ;<br />

Authorization<br />

Must have DBA privilege or RESOURCE privilege.<br />

19

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

Saved successfully!

Ooh no, something went wrong!