有没有SQL可以直接查的某个表的字段名和对应的字段类型?不要在command 里执行desc table_name;

解决方案 »

  1.   

    用工具看咯。toad的schema browser可以看很多东西。
      

  2.   

    select t.COLUMN_NAME,t.DATA_TYPE from dba_tab_columns t where owner='用户' and table_name='表名'
      

  3.   

    user_tab_columns -- all the tables owned by youall_tab_columns -- all the tables that you have access privilegedba_tab_columns -- all the tables in the database
      

  4.   

    dba_tab_columns needs DBA privilege