自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

Oracle如何查看所有表和字段以及表注釋和字段注釋?其實很簡單?。?/h1>

數(shù)據(jù)庫 Oracle
伙伴們按照我寫的文章順利安裝好Oracle數(shù)據(jù)庫后,又在微信上問我:我想查看Oracle數(shù)據(jù)庫中所有表和字段以及表注釋和字段的注釋,我該怎么操作呢?

[[336607]]

作者個人研發(fā)的在高并發(fā)場景下,提供的簡單、穩(wěn)定、可擴展的延遲消息隊列框架,具有精準的定時任務和延遲隊列處理功能。自開源半年多以來,已成功為十幾家中小型企業(yè)提供了精準定時調(diào)度方案,經(jīng)受住了生產(chǎn)環(huán)境的考驗。為使更多童鞋受益,現(xiàn)給出開源框架地址:

https://github.com/sunshinelyz/mykit-delay

寫在前面

小伙伴們按照我寫的文章順利安裝好Oracle數(shù)據(jù)庫后,又在微信上問我:我想查看Oracle數(shù)據(jù)庫中所有表和字段以及表注釋和字段的注釋,我該怎么操作呢?看著小伙伴們這么高的學習熱情,這些問題我都安排上了!這不,解決方案來了!

獲取表

  1. #當前用戶擁有的表 
  2. select table_name from user_tables;  
  3. #所有用戶的表 
  4. select table_name from all_tables;  
  5. #包括系統(tǒng)表 
  6. select table_name from dba_tables;  
  7. select table_name from dba_tables where owner='用戶名' 
  8. #描述當前用戶有訪問權(quán)限的所有對象  
  9. ALL_OBJECTS      describes all objects accessible to the current user.   
  10. #描述了數(shù)據(jù)庫中的所有對象  
  11. DBA_OBJECTS     describes all objects in the database.      
  12. #描述了當前用戶所擁有的所有對象 
  13. USER_OBJECTS    describes all objects owned by the current user.         
  • user_tables:TABLE_NAME,TABLESPACE_NAME,LAST_ANALYZED等
  • dba_tables:ower,table_name,tablespace_name,last_analyzed等
  • all_tables:ower,table_name,tablespace_name,last_analyzed等
  • all_objects:ower,object_name,subobject_name,object_id,created,last_ddl_time,timestamp,status等

獲取表字段

  1. select * from user_tab_columns where Table_Name='用戶表'
  2. select * from all_tab_columns where Table_Name='用戶表'
  3. select * from dba_tab_columns where Table_Name='用戶表'

獲取表注釋

  1. user_tab_comments;表注釋 
  2. select * from user_tab_comments 

user_tab_comments:table_name,table_type,comments。

相應的還有dba_tab_comments,all_tab_comments,這兩個比user_tab_comments多了ower列。

獲取字段注釋

  1. select * from user_col_comments 
  2. user_col_comments:table_name,column_name,comments 

相應的還有dba_col_comments,all_col_comments,這兩個比user_col_comments多了ower列。

user_col_comments;表字段注釋(列注釋)

user_col_comments視圖顯示已經(jīng)為表中的列輸入的注釋。這些注釋通過comment命令添加到數(shù)據(jù)庫中。user_col_comments視圖包含3 列:

  • Table_Name 表名或視圖名
  • Column_Name 列名
  • Comments 已經(jīng)為該列輸入的注釋

本文轉(zhuǎn)載自微信公眾號「冰河技術(shù)」,可以通過以下二維碼關(guān)注。轉(zhuǎn)載本文請聯(lián)系冰河技術(shù)公眾號。

 

責任編輯:武曉燕 來源: 冰河技術(shù)
相關(guān)推薦

2010-06-12 10:10:55

2010-05-07 15:23:52

Oracle系統(tǒng)性能

2010-09-29 14:48:16

2013-08-30 10:56:18

Windows 8.1

2022-01-10 06:52:59

查詢MySQL字段

2010-11-16 10:21:25

Oracle創(chuàng)建表

2010-07-13 15:56:16

SQL Server獲

2021-06-30 09:40:31

MySQL數(shù)據(jù)庫Java

2009-11-16 10:30:24

Oracle驅(qū)動表

2009-08-25 12:37:38

個人服務器架設

2010-07-09 15:31:25

SQL Server

2010-11-09 12:09:23

SQL Server查

2020-07-01 16:45:13

matplotlib內(nèi)嵌圖Python

2010-11-22 11:38:08

MySQL添加字段

2018-12-24 08:46:52

Kubernetes對象模型

2010-10-29 16:48:30

oracle查詢所有表

2010-11-01 14:30:47

db2擴充表空間

2009-10-20 18:30:03

Oracle查找用戶表

2010-09-16 15:56:15

SQL Server表

2013-09-30 10:11:40

Windows 8技巧
點贊
收藏

51CTO技術(shù)棧公眾號