Oracle中查詢一個表中欄位(列)個數,oracle欄位

來源:互聯網
上載者:User

Oracle中查詢一個表中欄位(列)個數,oracle欄位

如果一個表中有很多的欄位,而我們想要知道這個表中的欄位個數,如果使用如下方式一個一個數,則顯得很麻煩



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


相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.