Preamble
In Oracle PLSQL Synonym is an alternative name for objects such as tables, views, sequences, stored procedures and other database objects.
Typically, you use synonyms when you provide access to an object from another schema, and you don’t want users to worry about which schema the object belongs to.
Create (or Replace) Synonym
You can create a synonym so that users do not use a table name prefix with the schema name when using a table in a query.
Syntax for creating Oracle/PLSQL synonyms
CREATE [OR REPLACE] [PUBLIC] SYNONYM [schema .] synonym_name
FOR [schema .] object_name [@ dblink];
OR REPLACE
Allows you to recreate a synonym (if it already exists), without having to issue the DROP synonym command.
- PUBLIC – This means that the synonym is public and available to all users. Remember that the user must first have the appropriate privileges for the synonym object.
- schema – The appropriate schema. If this phrase is omitted, Oracle assumes that you are referring to your own schema.
- object_name – The name of the object for which you are creating the synonym. It can be one of the following objects:
- table
- view
- sequence
- stored procedure
- function
- package
- materialized view
- java class schema object
- user-defined object
- synonym
Let’s consider an example of how to create a synonym in Oracle/PLSQL
CREATE PUBLIC SYNONYM suppliers
FOR app;
This first example of CREATE SYNONYM demonstrates how to create a synonym with the name. Now, users of other schemes can reference the table with suppliers without the prefix of the scheme name and table name.
SELECT *
FROM suppliers;
If this synonym already exists and you want to recreate it, you can use OR REPLACE as follows:
CREATE OR REPLACE PUBLIC SYNONYM suppliers
FOR app.suppliers;
Drop synonym
After the synonym was created in Oracle, you will need to remove it at some point.
drop synonym syntax in Oracle/PLSQL
DROP [PUBLIC] SYNONYM [schema .] synonym_name [force];
- PUBLIC – Allows you to remove the public synonym. If you specified a PUBLIC, you may not need to specify a schema.
- Force – This will force Oracle to remove the synonym, even if it has dependencies. This is probably not a good idea to use force, as it can invalidate Oracle objects.
Let us consider an example of how to remove synonym in Oracle/PLSQL
For example:
DROP PUBLIC SYNONYM;
The DROP operator will delete the synonym with the name of suppliers that we defined earlier.
About Enteros
Enteros offers a patented database performance management SaaS platform. It proactively identifies root causes of complex business-impacting database scalability and performance issues across a growing number of clouds, RDBMS, NoSQL, and machine learning database platforms.
The views expressed on this blog are those of the author and do not necessarily reflect the opinions of Enteros Inc. This blog may contain links to the content of third-party sites. By providing such links, Enteros Inc. does not adopt, guarantee, approve, or endorse the information, views, or products available on such sites.
Are you interested in writing for Enteros’ Blog? Please send us a pitch!
RELATED POSTS
AI-Driven Banking RevOps: How Enteros Reinvents Performance Management for Modern Financial Institutions
- 11 December 2025
- Database Performance Management
Introduction Banking has entered a new era defined by instantaneous digital experiences, real-time analytics, omnichannel service delivery, and data-driven decision-making. While this evolution empowers banks to serve customers more efficiently, it also places immense pressure on IT ecosystems—especially databases, which serve as the backbone of every financial operation from payments to fraud detection. Modern banks … Continue reading “AI-Driven Banking RevOps: How Enteros Reinvents Performance Management for Modern Financial Institutions”
Enteros and Generative AI: Transforming Healthcare RevOps for a More Efficient, Data-Driven Future
Introduction The healthcare sector is undergoing a major digital transformation driven by cloud modernization, AI-enabled clinical systems, and data-intensive applications that power everything from EHR workflows to telehealth, diagnostics, research platforms, billing engines, and claims automation. Amid this evolution, healthcare Revenue Operations (RevOps)—the backbone of financial integrity and operational efficiency—is under growing pressure to deliver … Continue reading “Enteros and Generative AI: Transforming Healthcare RevOps for a More Efficient, Data-Driven Future”
How Enteros Uses Generative AI to Transform Performance Management in Modern eCommerce
- 10 December 2025
- Database Performance Management
Introduction The eCommerce landscape has entered a hyper-accelerated era where digital performance directly influences customer loyalty, conversion rates, and long-term profitability. Online retailers must deliver fast product searches, frictionless checkout flows, real-time inventory updates, and personalized customer experiences—across millions of concurrent users and distributed digital touchpoints. Behind this seamless experience lies a complex ecosystem of … Continue reading “How Enteros Uses Generative AI to Transform Performance Management in Modern eCommerce”
Future-Ready Tech Operations: Enteros’ Unified AIOps, FinOps, and RevOps Framework for Smarter Database Optimization
Introduction The technology sector is evolving at an unprecedented pace, driven by cloud-native architectures, massive distributed databases, and a global appetite for real-time digital experiences. As organizations scale digital services, they generate complex operational, financial, and performance challenges across their infrastructure. Technology teams must now balance three strategic pillars simultaneously: operational efficiency (AIOps), financial governance … Continue reading “Future-Ready Tech Operations: Enteros’ Unified AIOps, FinOps, and RevOps Framework for Smarter Database Optimization”