«Back to Home

Oracle Jump Start

Topics

How To Use Synonyms In OraclePLSQL

Description
 
Synonyms is an alternative name for the objects such as tables, views, sequences stored procedures and other database objects.
 
Syntax
  1. Create or Replace Public Synonym [Schema .] synonyms_name  
  2. for [Schema .] object_name;  
Example
  1. Create public synonym Employee  
  2. for app.Employee;  
1
 
2 

Drop Synonyms
 
In Oracle, you have been creating synonyms and if you want to drop the synonyms, use the command, given below-
 
Syntax
  1. Drop public synonym synonym_name;  
Example
  1. Drop public synonyms Employee;  
3
 
4 

Summary
 
Thus, we learnt, Synonyms is an alternative name for the objects such as tables, views, stored procedures and other database objects. We learnt, how to use these synonyms in Oracle with the examples.