oracle 資料庫資訊查詢

來源:互聯網
上載者:User

標籤:

/*查詢目前使用者表資訊/

select A.column_name    欄位名,

       A.data_type      資料類型,

       A.data_length    長度,

       A.data_precision 整數位,

       A.Data_Scale     小數位,

       A.nullable       允許空值,

       A.Data_default   預設值,

       B.comments       備忘

  from user_tab_columns A, user_col_comments B

 where A.Table_Name = B.Table_Name

   and A.Column_Name = B.Column_Name

   and A.Table_Name = ‘表名‘;

 

/*按照備忘,查詢目前使用者全資料庫表列/

SELECT * FROM USER_COL_COMMENTS COLS WHERE COLS.comments LIKE ‘%欄位備忘%‘;

 

/*查詢目前使用者所有視圖/

select view_name from user_views;

 

/*查詢目前使用者所有表/

select table_name from user_tables;

 

/*查詢目前使用者所有觸發器/

SELECT UT.trigger_name FROM USER_TRIGGERS UT;

 

/*查詢目前使用者所有預存程序/

SELECT UPRO.*

  FROM USER_PROCEDURES UPRO

 WHERE UPRO.object_type = ‘PROCEDURE‘;

 

/*查詢目前使用者所有索引/

select uindex.index_name--, uindex.*

  from user_indexes uindex

 where uindex.index_type = ‘NORMAL‘

 ORDER BY UINDEX.index_name;

 

oracle 資料庫資訊查詢

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.