Number of columns

前端 未结 5 593

how do you count the number of columns in a table in oracle?

5条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-29 14:33

    SELECT count(*) FROM user_tab_columns WHERE table_name = 'FOO'
    

    should give you the number of columns in foo. You can obtain quite a bit of information from USER_TAB_COLUMNS and USER_TABLES (there are also ALL_ and DBA_ variants).

提交回复
热议问题