Any explanation for the following would be much appreciated.
I have two users A and B, both with their own schemas.
if I execute this sql (as UserA)
create table test_table
as select account_no,
period
from userB.accounts
where period = last_day(to_date('31-OCT-2002')-170)
No problem, Table created.
But if I execute this sql
create view test_view
as select account_no,
period
from userB.accounts
where period = last_day(to_date('31-OCT-2002')-170)
Then I get an error
from userB.accounts
*
ERROR at line 6:
ORA-00942: table or view does not exist
I can overcome this by granting SELECT ANY TABLE to UserA, but I realy don't want to give this privilege to this user.
Why will oracle let me create a table in userA schema based on a select from a table in userB schema, but wont let me create a view based on the same select statement?
![]()



Bookmarks