Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2004

    Unanswered: Getting the schema for the user_tables

    i'm having some problems,
    i want to get all schema from the user tables....
    i tested my query using the following sql stmts... IT WORKED

    select distinct owner
    from all_tables;

    - and -

    select distinct owner
    from dba_tables;

    -however when i use-
    select distinct owner
    from user_tables;

    i encounter problems, from these i can say that
    user_tables is wrong, please tell me the correct
    table name since i only want to get the schema
    found on the user tables....

    thank you guys in advance...

  2. #2
    Join Date
    Dec 2004

    A USER_ view displays all the information from the schema of the current user.No special privileges are required to query these views.

    Suppose u have logged in as Scott user
    Then the Owner is by default Scott user and hence there is not such Column "OWNER" in user_tables view.

    An ALL_ view displays all the information accessible to the current user,
    including information from the current user’s schema as well as information
    from objects in other schemas,

    A DBA_ view displays all relevant information in the entire database. DBA_
    views are intended only for administrators

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts