具有授予选择/插入权限的视图
我在大学里使用 Oracle9i 服务器。
我已授予我的朋友对视图的选择和插入权限 'v1'。
他能够在视图上选择
和插入
,但显然,当他插入一行时,视图会为其用户ID维护一个单独的副本。
IE。当我说:
select * from v1;
我看不到他插入到视图 'v1' 中的行。这是默认行为吗?我不应该能够看到他插入的行吗,因为它仍然归我所有?
我是新手,所以我想我不知道有关视图和授予权限的一些概念。
I'm working on an Oracle9i server in college.
I have granted my friend select and insert permissions on a view 'v1'.
He is able to select
and insert
on the view,but apparently the view maintains a separate copy for his userid when he inserts a row.
ie. when I say:
select * from v1;
I'm not able to see the row he inserted into view 'v1'.Is this the default behaviour?Shouldn't I be able to see the row what he inserted because its still owned by me?
I'm a newbie so I think I'm not aware of some of the concepts with regards to views and granting permissions.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果其他用户实际上正在插入满足视图条件的行并且其他用户正在提交他的事务,那么您将能够在会话中看到该行。
SELECT * FROM Pavitar.v1
)吗?例如,如果我创建一个视图
EMP_VIEW
,它返回EMP
表中DEPTNO
为 10 的所有数据,我可以将一行插入到通过DEPTNO
不为 10 的视图的EMP
表。因此,如果我查询视图,我将看不到该行
,但我会在底层看到它桌子
If the other user is actually inserting a row that meets the criteria of the view and the other user is committing his transaction, then you would be able to see the row in your session.
SELECT * FROM Pavitar.v1
)For example, if I create a view
EMP_VIEW
that returns all data from theEMP
table where theDEPTNO
is 10, I can insert a row into theEMP
table via the view that does not have aDEPTNO
of 10.So I won't see the row if I query the view
But I will see it in the underlying table