how to find column detials

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lokesh reddy
    New Member
    • Dec 2011
    • 1

    how to find column detials

    i have a table in that table some columns are there i want to find if column having a primarykey or views for that particular column
  • rski
    Recognized Expert Contributor
    • Dec 2006
    • 700

    #2
    For checking promary key use that
    Code:
    select * from all_constraints a, all_cons_columns b where a.constraint_name=b.constraint_name and constraint_type='P'
    and b.column_name='XXXXX'
    For views I thik you can check user_dependenci es(or dba_dependencie s) views but it will not tel you if given the column name is included in te view definition. You can also scan column text of the view all_views but this column is of type LONG so you can not simply use LIKE operator.

    Comment

    Working...