读书人

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

发布时间: 2012-02-12 17:16:34 作者: rapoo

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

读书人网 >oracle

热点推荐