select * from ALL_TAB_COLUMNS where TABLE_NAME='MY_TABLE_NAME'这样应该可以,你可以试试看

解决方案 »

  1.   

    To: lishuguang(shuguang) 仅仅查询ALL_TAB_COLUMNS 得不到主键、索引等信息
      

  2.   

    Select 
      T1.column_name,T1.data_type,decode(T3.CONSTRAINT_TYPE,'P','Yes','No') 
    from
      user_tab_columns T1,user_cons_columns T2,user_constraints T3
    where
      T1.COLUMN_NAME = T2.COLUMN_NAME (+) 
    and
      T2.CONSTRAINT_NAME = T3.CONSTRAINT_NAME (+) 
    and
      T2.TABLE_NAME = T2.TABLE_NAME 
    and
      T1.TABLE_NAME = :My_table_Name;
      

  3.   

    查询到主键时,多了行主键列
    -----不能distinct掉?
      

  4.   

    user_tab_columns T1,ind T2,user_constraints T3  --这三个表是否行