Get the App
SLTechnology News&Howtos  ›  Database  › 

Oracle series: (23) synonyms

Shulou Source: shulou.com Published: 2022-06-01 12:23:23 10月05日 Update

What is a synonym [Synonym]

(1) for some objects with longer names (tables, views, indexes, sequences,. ) subtract and replace it with an alias

The role of synonyms

(1) Shorten the length of object names

(2) facilitate access to other users' objects

Create synonyms corresponding to the salgrade table

Create synonym synonym for table name / view / other object create synonym e for salgrade;create synonym ev5 for emp_view_5

Grant create synonym permission to an ordinary scott user as sys

Grant create synonym to scott

Revoke create synonym permissions from an ordinary scott user as sys

Revoke create synonym from scott

Manipulate salgrade tables using synonyms

Select * from s

Delete synonyms

Drop synonym ev5

Will the deletion of synonyms affect the base table?

Will not affect the base table

Does deleting the base table affect synonyms?

Will affect synonyms

Tags: Synonyms synonyms objects influences users normal first names permissions views identities roles aliases sequences indexes length Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn Shulou Tech Info NVidia Xiaomi Huawei