Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2012

    Unanswered: oracle view execution

    Hi guys,
    I need to find out the actual columns used in the view ( and not the aliased one ) from query.
    for ex.
    Customer table has columns = Id , Name , Address
    CustomerView has all the columns from customer table with alias as follows
    Id -> CustomerId , Name -> CustomerName , Address -> CustomerAddress

    I need a query which will give me result as follows
    ViewName TableName TableColumns Alias Column Name
    CustomerView Customer Id CustomerId
    CustomerView Customer Name CustomerName
    CustomerView Customer Address CustomerAddress

    Is there any table which holds this information ?
    In SQL there is sys.sql_dependencies table which holds this information, Is there any equivalent table present in oracle by which I can achieve this objective ?

  2. #2
    Join Date
    Aug 2003
    Where the Surf Meets the Turf @Del Mar, CA
    Provided Answers: 1
    >Is there any table which holds this information ?
    not available on per column basis
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Nov 2003
    Provided Answers: 23
    Quote Originally Posted by nmagare View Post
    Is there any table which holds this information ?
    Yes, ALL_TAB_COLUMNS which is documented in the manual: ALL_TAB_COLUMNS

    An example is here: SQL Fiddle

    You also might be interested in ALL_DEPENDENCIES
    Last edited by shammat; 12-27-12 at 14:57.
    I will not read nor answer questions where the SQL code is messy and not formatted properly using [code] tags:

    Tips for good questions:

  4. #4
    Join Date
    Jul 2003
    select text from dba_views where owner = 'XXXX' and view_name = 'XXXX';
    - The_Duck
    you can lead someone to something but they will never learn anything ...

Tags for this Thread

Posting Permissions

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