熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> Oracle >> 正文

oracle同義詞的使用

2022-06-13   來源: Oracle 

  同義詞是對象的一本別名同義詞並不占用任何實際的存儲空間只是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用戶的baselect * from bb創建同義詞為a則查詢很方便aselect * from a


From:http://tw.wingwit.com/Article/program/Oracle/201311/18038.html
    推薦文章
    Copyright © 2005-2022 電腦知識網 Computer Knowledge   All rights reserved.