1、查詢表中列數
select count( column_name ) from user_tab_columns where table_name = '表名'; --表名為大寫或者:
select count(column_name) from user_tab_columns where table_name=upper('表名');2、查詢表中所有列名
SELECT COLUMN_NAME FROM USER_TAB_COLUMNS WHERE TABLE_NAME = '表名' ORDER BY COLUMN_ID或者:
SELECT COLUMN_NAME FROM ALL_TAB_COLUMNS WHERE TABLE_NAME = '表名' ORDER BY COLUMN_ID小注: