Oracle中有没有统计一个表有多少个字段的这样一个函数?谢谢。

解决方案 »

  1.   

    我写的,不知道有没有更好的,也学习下select count(*), table_name from user_tab_columns 
    where table_name in (select table_name from cat)
    group by table_name
      

  2.   

    select * from user_col_comments  where table_name='CODE_RULE'
      

  3.   

    select a.tname,count(*) field_count from  tab a,user_col_comments b where tabtype='TABLE' and a.tname=b.table_name group by a.tname
      

  4.   

    precipitant(塞北的雪) 正解
      

  5.   

    我反倒觉得 helloworld 的方法 要好些。
      

  6.   

    select count(*), table_name from user_tab_columns 
    where table_name in (select table_name from cat)
    group by table_name
    ++++++++++++++++++++++++++++++++++++++++如果非要这样得话,还是改成表关联好一些,