-- 查看主鍵約束
SELECT * FROM information_schema.`TABLE_CONSTRAINTS`;
-- 查看外鍵約束
SELECT * FROM information_schema.`REFERENTIAL_CONSTRAINTS`;
-- 查看表權(quán)限信息
SELECT * FROM information_schema.`TABLE_PRIVILEGES`;
-- 查看所有列DML權(quán)限信息
SELECT * FROM information_schema.`COLUMN_PRIVILEGES`;
-- 查看表索引信息
SELECT * FROM information_schema.`STATISTICS`;
-- 查看用戶權(quán)限信息
SELECT * FROM information_schema.`USER_PRIVILEGES`;
-- 查看觸發(fā)器
SELECT * FROM information_schema.`TRIGGERS`;
-- 查看視圖
SELECT * FROM `information_schema`.`VIEWS`;
-- 查看存儲過程或存儲函數(shù)
SELECT * FROM `information_schema`.`ROUTINES`;
--查看事件信息
SELECT * FROM information_schema.events;
備注:查看Events是否開啟:
MySQL> select @@global.event_scheduler;
mysql> show variables like 'event_scheduler';
網(wǎng)站名稱:如何在MySQL元數(shù)據(jù)庫里查看索引,約束,觸發(fā)器,存儲過程和事件的相關(guān)信息
分享網(wǎng)址:
http://weahome.cn/article/poihhs.html