Oracle中如果建立VIEW基于其它用户的表?

liuyann 2005-05-30 03:21:47
Oracle中如果建立VIEW基于其它用户的表?

Oracle 中, 有用户USERA, USERB, USERA中有表TABLE_AA
create table_aa (
userID varchar2(10),
...
);

grant all on table_aa to USERB;

可否在USERB下建立如下视图?
CREATE OR REPLACE VIEW VTABLE_AA
AS
select * from USERA.TABLE_AA where userID=12;

但系统提示出错
ORA-00942: table or view does not exist

以下语句
select * from USERA.TABLE_AA where userID=12;
正常,有结果返回.

请问是何原因?
SQL> select * from v$version;

BANNER
----------------------------------------------------------------
Oracle8i Enterprise Edition Release 8.1.7.4.1 - Production
PL/SQL Release 8.1.7.4.0 - Production
CORE 8.1.7.2.1 Production
TNS for 32-bit Windows: Version 8.1.7.4.0 - Production
NLSRTL Version 3.4.1.0.0 - Production
...全文
104 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
liuyann 2005-06-02
  • 打赏
  • 举报
回复
但系统提示出错
ORA-00942: table or view does not exist
bzszp 2005-05-30
  • 打赏
  • 举报
回复
connect USERA/psw
grant select on TABLE_AA to userb;
connect userB/psw
CREATE OR REPLACE VIEW VTABLE_AA
AS
select * from USERA.TABLE_AA where userID=12;
...

17,377

社区成员

发帖
与我相关
我的任务
社区描述
Oracle 基础和管理
社区管理员
  • 基础和管理社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧