Click to See Complete Forum and Search --> : How to differentiate if the table in oracle is system table or user table
manishakya
07-19-2005, 01:39 AM
Can anybody pls help me solve this? I am new to oracle.
When we log in as sys user and do "select * from all_tables where owner = 'sys'", it shows all system tables as well as user tables (if any). How can we get user tables only from that query?
Pls respond.
Srinivas_Sharma
07-19-2005, 04:04 AM
If u create the user tables in the same tablespace as system, no way u can distinguish bet. System and User tables...
If they r in different tablespaces...filter it with the query.
Srini
WilliamR
07-19-2005, 04:10 AM
The 'USER_' views show objects belonging to you (i.e. those in your own schema).
The 'ALL_' views show objects accessible to you (your own and those you have been granted permissions on).
The 'DBA_' views show everything.
Also note that if your system uses object tables, these will appear in ALL_OBJECT_TABLES and not ALL_TABLES. You might therefore want to use USER_ALL_TABLES/ALL_ALL_TABLES/DBA_ALL_TABLES.
I hope you don't mean that you have created your own tables in the SYSTEM schema. Look at the CREATED date column in USER_OBJECTS.