information schema資料庫表資訊

2022-03-01 22:18:24 字數 2322 閱讀 4805

/*

information_schema

*//*

字符集*/

select

*from

information_schema.character_sets c;

select

*from

select

*from

information_schema.collations c;

/*不詳

*/select

*from

information_schema.column_privileges c;

/*欄位字段

*/select

*from

information_schema.`columns` c;

/*引擎

*/select

*from

information_schema.engines e;

/*事件

*/select

*from

information_schema.`events` e;

/*不詳

*/select

*from

information_schema.files f;

select

*from

information_schema.global_status g;

select

*from

information_schema.global_variables g;

select

*from

information_schema.key_column_usage k;

select

*from

information_schema.partitions p;

/*引擎版本

*/select

*from

information_schema.plugins p;

/*程序列表

*/select

*from

information_schema.`processlist` p;

/*分析

*/select

*from

information_schema.profiling p;

/*約*束/

*/select

*from

information_schema.referential_constraints r;

/*procedure and function

*/select

*from

information_schema.routines r;

/*不詳細

*/select

*from

information_schema.schema_privileges s;

/*database

*/select

*from

information_schema.schemata s;

/*會話狀態

*/select

*from

information_schema.session_status s;

/*會*話變數/

*/select

*from

information_schema.session_variables s;

/*統計資訊

*/select

*from

information_schema.

statistics

s;/*

約*束/

*/select

*from

information_schema.table_constraints t;

/*表的特權

*/select

*from

information_schema.table_privileges t;/*表

*/select

*from

information_schema.`tables` t;

/*確髮器

*/select

*from

information_schema.triggers t;

/*系統使用者許可權

*/select

*from

information_schema.user_privileges u;

/*檢視

*/select

*from

information_schema.views v;

官方資料:

information schema資料庫表說明

information schema資料庫表說明 schemata表 提供了當前mysql例項中所有資料庫的資訊。是show databases的結果取之此表。tables表 提供了關於資料庫中的表的資訊 包括檢視 詳細表述了某個表屬於哪個schema,表型別,表引擎,建立時間等資訊。是show t...

INFORMATION SCHEMA資料庫介紹

刪除mysql資料庫某一張主鍵表的所有外來鍵關係 select concat alter table table name drop foreign key constraint name,from information schema.key column usage a where a.tabl...

SQL查詢資料庫資訊, 資料庫表名, 資料庫表資訊

sql查詢資料庫資訊,資料庫表名,資料庫表資訊 以下例子,在sql server 中可以直接執行,預設資料庫為master 獲取資料庫的所有使用者名稱 select from sysusers where islogin 1 1.獲取所有的資料庫名 select name from master.s...