日期:2014-05-16 浏览次数:20467 次
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小注: