Database Reference
In-Depth Information
Example:
ALTER SEQUENCE emp_seq
MAXVALUE 1500;
We can also alter the structure of the already exisiting sequence
in the database using the ALTER SEQUENCE statement.
Example:
DROP SEQUENCE emp_seq;
We can also drop a sequence from the database using the DROP
SEQUENCE statement.
Lastly, we create synonym using CREATE SYNONYM
statement. Synonym is basically an alias or another name given
to already existing database object e.g. table, view, sequence,
stored procedure, stored function, package etc. The last three
names you just read are also object of oracle database but the fall
under the category of PL/SQL language. Synonym can be further
clarified by looking at the following real world example.
Example:
CREATE SYNONYM offices
FOR hr.locations;
So instead of typing the full name for the object i.e.
schema.object_name, you have to just type the synonym name. If
you want to grant access to other users, the users need not to
know which schema this object is in. Moreover, if you drop this
synonym all users will not be having access to hr.locations table
any more. Remember dropping the synonym will not drop the
underlying table or object.
Example:
CREATE PUBLIC SYNONYM employees
FOR hr.employees@sales;
Search WWH ::




Custom Search