background image
<< Dropping a Sequence | Droping a Synonym >>
<< Dropping a Sequence | Droping a Synonym >>

Using Synonyms

Using Synonyms
3-28 Oracle Database 2 Day Developer's Guide
3.
In the Confirmation window, click OK.
You have now deleted the sequence
test_seq
. The equivalent SQL statement
follows:
DROP SEQUENCE "HR"."TEST_SEQ";
Using Synonyms
A synonym is an alias for any schema object and can be used to simplify SQL
statements or even obscure the names of actual database objects for security purposes.
Additionally, if a table is renamed in the database (
departments
to
divisions
),
you could create a
departments
synonym and continue using your application code
as before.
To create a synonym using the SQL Developer interface:
The following steps will create a synonym,
positions,
that you can use in place of
the
jobs
schema object.
1.
In the Connections navigation hierarchy, right-click Synonyms.
2.
Select New Synonym.
3.
In the New Synonym window, set the following parameters:
Ensure that Schema is set to
HR
.
Set Name to
POSITIONS
.
In the Properties tab:
Select Object Based. This means that the synonym refers to a specific schema
object, such as a table, a view, a sequence, and so on.
Set Object Based to
JOBS
.
See Also:
Oracle Database SQL Language Reference for information on the
DROP SEQUENCE
statement