同義詞是對象的一本別名同義詞並不占用任何實際的存儲空間只是oracle的數據字典中保存其定義描述在使用同義詞時oracle會將其翻譯為對應對象的名稱
同義詞分類公共同義詞私有同義詞
創建同義詞create [public] synonym synonym_name for schema_objectCREATE [PUBLIC] SYNONYM synonym_name FOR schema_object注創建同義詞時所對應的模式對象不必存在
刪除同義詞DROP [PUBLIC] SYNONYM synonym_name
創建同義詞必須的權限conn / as sysdba grant create synonym to scottgrant create public synonym to scott
優點a用戶去訪問b用戶的b表aselect * from bb創建同義詞為a則查詢很方便aselect * from a
From:http://tw.wingwit.com/Article/program/Oracle/201311/18038.html