Oracle視圖小例

1、Oracle用戶權限問題(使用scott創建視圖時,提示權限不足)

   先登錄sys用戶

       在sql 命令窗口下執行:

       grant create any view to scott;

      (解鎖:

      alter user myuser account unlock; )


下面是一個視圖創建例子:

create or replace view pow_u_r_g
as select tus.*,tro.ROLE_NAME,tgr.GROUP_NAME
from POW_TUSER tus,POW_TUSERROLERELATION turr,POW_TUSERGROUPRELATION tugr,POW_TROLE tro,POW_TGROUP tgr
where tus.tu_id=turr.tu_id and turr.tr_id=tro.tr_id and tus.tu_id=tugr.tu_id and tugr.tg_id=tgr.tg_id; 


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章