-2

I'm getting an insufficient privilege while updating the table in B schema. The table owner is A schema but I have given the update grant to B schema, even then it is throwing an error. If i give the Select grant along with update it is working. Why I need to give select grant along with update if i just want to update the table. I'm using Exadata as my back end version

Suresh
  • 5
  • 3
  • 2
    What is your update statement? – sandman Jul 06 '17 at 12:09
  • 1
    Exadata isn't a version, it's a product. – Mat Jul 06 '17 at 12:13
  • What does it mean table in B schema. Table owner is A? – Kacper Jul 06 '17 at 12:16
  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the [How to Ask](https://stackoverflow.com/help/how-to-ask) page for help clarifying this question. – viCky Jul 06 '17 at 12:22

1 Answers1

0

Update works, without need granting select provilage, as shown below. I used Oracle for this test case.

SQL> create user test1 identified by test1 profile default ;

User created.

SQL> grant connect , resource to test1 ;

Grant succeeded.

SQL> create user test2 identified by test2 profile default ;

User created.

SQL> grant connect , resource to test2 ;

Grant succeeded.

SQL> connect test1/test1 Connected. SQL> create table abc (name varchar2(20) ) ;

Table created.

SQL> insert into test1.abc values ('xyz') ;

1 row created.

SQL> commit 2 ;

Commit complete.

SQL> select * from test1.abc 2 ;

NAME

xyz

SQL> grant update on test1.abc to test2 ;

Grant succeeded.

SQL> connect test2/test2 Connected.

SQL> update test1.abc set name='XXYYZZ' ;

1 row updated.

SQL> commit 2 ;

Commit complete.

SQL> connect test1/test1 Connected. SQL> select * from abc ;

NAME

XXYYZZ