0

I want that table created by one user should be accessible to another user also I am doing the following thing.

Connect to user2 connected

    SQL>grant SELECT on INFO to user1;   //info is a table created by user2
    SQL>grant succeeded

connect to user1; connected

    SQL>select * from INFO;

Then it returns the error

     select * from INFO
                   *
     error at line1:
     ora 00942: table or view does not exist

Please help me

Nagaraj S
  • 13,316
  • 6
  • 32
  • 53
Mayur Sharma
  • 372
  • 2
  • 9
  • 1
    You have to qualify table name with schema name, like so: `select * from user2.INFO` Otherwise the table name is resolved to your current schema, which is `user1` and there is no `info` table in it – Nick Krasnov Dec 26 '13 at 09:06
  • understood the difference. there can be even possibilities that both user have same table name so we always have to use the schema along with the table. – Mayur Sharma Dec 26 '13 at 09:26
  • @user3136186 If you want to omit schema name in your queries then you can create public synonym and grant user1 access to it. – Yaroslav Shabalin Dec 26 '13 at 15:16

1 Answers1

1

try executing your query like this: user2 is the Schema here..

select * from user2.INFO

Hope it helps..

Sai Avinash
  • 4,683
  • 17
  • 58
  • 96