Get the App
SLTechnology News&Howtos  ›  Database  › 

What is the meaning of synonyms in Oracle

Shulou Source: shulou.com Published: 2022-05-31 14:43:21 10月02日 Update

This article mainly introduces the meaning of synonyms in Oracle. It is very detailed and has a certain reference value. Friends who are interested must finish it!

The synonym for oracle (synonyms) is a mapping relationship, which can be understood as a C++ pointer or a reference in java, that is, a similar alias.

1. Create synonyms:

Create or replace public synonym table_A for user.table_B

At this point, using table_A for all operations is actually an operation on user.table_B.

two。 Delete synonyms:

Drop public synonym table_name

Delete synonyms and the original table will not be affected.

3. View all synonyms:

Select * from dba_synonyms

Synonyms have the following benefits:

1. Save a lot of database space, and there is little difference in the operation of the same table for different users.

2. The transparent processing of the program can be realized. When the underlying table is changed, the program does not need to be modified, only the alias can be modified by the database.

The above is all the content of the article "what are synonyms in Oracle?" Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Tags: Synonyms synonyms meaning content aliases data databases programs articles different that is values interests benefits reality guys buddies that is differences bottom Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB Linux MySQL Microsoft Huawei