首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > oracle >

在oracle数据库中怎么获得表的列名和列数

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

在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 '

热点排行