Table Output

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • orajit
    New Member
    • Nov 2007
    • 75

    Table Output

    I have run following query .

    select COLUMN_NAME from DBA_TAB_COLUMNS where TABLE_NAME='ADP _DST';


    It will give me the out of all column_name in ADP_DST table.


    I also get the colum_name from DESC ADP_DST


    What I obseverved that the oder of column_name by query is different from that of Sql Command ie DESC


    I wanted the same output (order of column) of query that i would get it from DESC command .

    Could u please give me the modified query .How to acheive that .
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    use the following query

    [code=oracle]
    SELECT COLUMN_NAME, COLUMN_ID FROM DBA_TAB_COLUMNS where TABLE_NAME='TAB LE_NAME' ORDER BY COLUMN_ID
    [/code]

    Comment

    Working...