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

kosenrufu
kosenrufu used Ask the Experts™
on
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
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2012
Distinguished Expert 2018

Commented:
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;

Commented:
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

Author

Commented:
I am trying to access this table from another schema

Author

Commented:
I do have permissions

Commented:
Ok, then try what slightwv mentioned
Most Valuable Expert 2012
Distinguished Expert 2018

Commented:
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;
Top Expert 2008

Commented:
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;
Most Valuable Expert 2012
Distinguished Expert 2018
Commented:
>>you have to grant SELECT privilige from the acount of the owner of the table.

I believe I covered that in the first post.  I also believe the asker stated they had permissions.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial