当前位置: 代码迷 >> Oracle管理 >> 在oracle数据库中怎么获得表的列名和列数
  详细解决方案

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

热度:17   发布时间:2016-04-24 05:46:00.0
在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 '
  相关解决方案