日期:2014-05-17  浏览次数:20819 次

在oracle数据库中如何获得表的列名和列数
在网上搜索了几个,但是命令错误。
不知道oracle中用什么命令

------解决方案--------------------
select column_name from all_tab_columns where table_name = '表名 ';

要获得列数加 count(*) 就可以了
------解决方案--------------------
select * from user_tab_cols t where t.table_name= 'xxx '
select count(*) from user_tab_cols t where t.table_name= 'xxx '