Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Synonym DOUBT ..????

AJ.MMar 23 2008 — edited Apr 30 2008
... Hello,

I have created a SYNONYM named emp1 for employees table which is located in HR schema ... & the SYntax i used was .. " Create synonym emp1
FOR employees"
then ..... " GRANT ALL
ON emp1
TO public; " .. so that everybody can use this synonym ..without actually modifying the employees table ... I basically work under 3 schemas .that are ..SCOTT, HR, OE ..
.... Now my problem is ..When i LOG--IN as SCOTT / tiger & i type ..
" select * from emp1" .. it should give me the whole employees table ..BUT infact it gives me ERROR

"ERROR at line 1:
ORA-00942: table or view does not exist " ..This error it gives me ...

But when i try " Select * from HR.emp1 " ..only then it shows me the whole table ...
I want that ...when i log IN as scott i should provide the " schema .emp1 " tht means .when i type " select * from emp1;" .. i should get the data .... so what is the solution to this ..
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 28 2008
Added on Mar 23 2008
8 comments
660 views