檢視表中字段的型別及其長度

2021-08-09 12:47:04 字數 811 閱讀 8416

1、檢視一張表的全部欄位名與資料型別  

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

2、檢視某些列的資料型別及其長度

select

列名,data_type,data_length,data_precision ,data_scale

from all_tab_columns

where table_name=

upper('

表名');

3、檢視指定列的資料型別

select data_type   from

user_tab_columns t

where t.column_name=

upper('列名')

and t.table_name =

upper(trim('

表名'));

4、通過user_constraints檢視所有約束   

select

*from user_constraints where table_name =

upper('

表名');

5、檢視主鍵約束:   

select

*from user_constraints where constraint_type='p

'and table_name=

upper('

表名');

Mysql中檢視表的型別InnoDB

mysql中檢視表的型別innodb 問題描述 mysql 資料表主要支援六種型別 分別是 bdb heap isam merge myisam innobdb。這六種又分為兩類,一類是 事務安全型 transaction safe 包括bdb和innodb 其餘都屬於第二類,稱為 非事務安全型 n...

Hive檢視表的分割槽字段

查詢某個表的分割槽資訊 show partitions employee 檢視某個表是否存在某個特定分割槽鍵 show partitionsemployee partition country us describe extendedemployee partition country us sho...

mysql 檢視表的型別

mysql 資料表主要支援六種型別 分別是 bdb heap isam merge myisam innodb myisam 預設的mysql外掛程式式儲存引擎,它是基於isam型別,但它增加了許多有用的擴充套件,它是在web 資料倉儲和其他應用環境下最常使用的儲存引擎之一。注意,通過更改stora...