Oracle中查询一个表中字段 列 个数

分享一下我老师大神的人工智能教程!零基础,通俗易懂!http://blog.csdn.net/jiangjunshow

也欢迎大家转载本篇文章。分享知识,造福人民,实现我们中华民族伟大复兴!

               

如果一个表中有很多的字段,而我们想要知道这个表中的字段个数,如果使用如下方式一个一个数,则显得很麻烦



Oracle中可以使用如下sql来查询字段(列)个数

select count(*) from user_tab_columns where table_name=upper('表名')

或者

select max(column_id) from user_tab_columns where table_name=upper('表名')


作者:itmyhome

链接:http://blog.csdn.net/itmyhome1990/article/details/44020963


           

给我老师的人工智能教程打call!http://blog.csdn.net/jiangjunshow

这里写图片描述

猜你喜欢

转载自blog.csdn.net/hffygc/article/details/83953972
今日推荐