Link to home
Start Free TrialLog in
Avatar of kosenrufu
kosenrufu

asked on

How do I query from a table created in Table Space in Oracle?

How do I query from a table created in Table Space in Oracle?

I keep getting this error ORA-00942: table or view does not exist
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

You are likely not the owner of the table or you have not been granted select on the table.

Try adding the owner/schema to the table:

select * from owner.tablename;

If you still get that error, as the owner of the table:
grant select on tableName to otherUser;
Not able to get your question "query from a table created in Table Space in Oracle"

regarding error ORA-00942: table or view does not exist

Can you check if the table exists ?

SELECT * FROM ALL_TABLES
WHERE TABLE_NAME = <'yourtablenameinCAPS>'>

If yes, Are you trying to access this table from another schema or dblink?

Make sure you have required previliges
Avatar of kosenrufu

ASKER

I am trying to access this table from another schema
I do have permissions
Ok, then try what slightwv mentioned
You can simplify not adding the owner name by creating a synonym:

create synonym table_name for owner.tablename;

then you can: select * from table_name;
Additionally to creating synonym you have to grant SELECT privilige from the acount of the owner of the table.

connect scott/tiger@orcl
grant select on emp to big_brother;

connect big_broder/spy@oracle

SELECT * FROM scott.emp;
ASKER CERTIFIED SOLUTION
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial