5.1. What You Can See

Objects that we create can always be extracted from views that begin with “USER_.” If we create 10 tables in our schema, then a query of USER_TABLES will return 10 rows—each row returning attribute information about a table.

Suppose that an Oracle account user named SMITH creates a table called PAYROLL and grants all privileges on PAYROLL to the user SCOTT. Can SCOTT see PAYROLL in USER_TABLES? No, but SCOTT can see PAYROLL from ALL_TABLES. The ALL_TABLES view shows not just tables we create but also other tables to which we have been granted access.

The views we are concerned with are named with the following prefixes:

  • USER

  • ALL

  • DBA

These prefixes are an aid in limiting the scope of what we want to see, need to see, or should ...

Get Programming Oracle® Triggers and Stored Procedures, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.