我在Oracle授予对象表选择权时遇到问题 .
创建表格时
create table t (name char, ...)
然后我没有任何问题将任何权限授予任何用户 .
但是当从一个对象创建表时
create or replace
type type_client under type_personne (
num int ,
username varchar(30),
balance int,
ta table_achat,
ref_admin ref type_admin,
member function get_prix_achat_total return int
);
create table t of type_client
我尝试将其选择为 user1
,但是当我从 user1
连接并尝试从该表中选择任何数据时:
select * from system.table_client
我看到了这样的信息:
ORA-00904 ::无效标识符00904. 00000 - “%s:无效标识符”*原因:*操作:行错误:1列:34
有时我看到这样的信息:
内部错误:未知或未实现的访问者类型:9
1 回答
好像你的
Select
查询不是correct
. 你可以这样做:编辑:
正如我的评论中所提到的,对象定义也具有
member
函数 . 所以如果你做Select tb.get_prix_achat_total() from t tb
,它应该返回结果 . 当定义中有任何功能时,您必须使用列名代替*
.