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; 


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