Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to view information about indexes, constraints, triggers, stored procedures and events in the MySQL Metabase

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

-- View primary key constraints

SELECT * FROM information_ schema.`TABLE _ CONSTRAINTS`

-- View foreign key constraints

SELECT * FROM information_ schema.`REFERENTIAL _ CONSTRAINTS`

-- View table permission information

SELECT * FROM information_ schema.`TABLE _ PRIVILEGES`

-- View DML permission information for all columns

SELECT * FROM information_ schema.`Column _ PRIVILEGES`

-- View table index information

SELECT * FROM information_ schema.`STATISTICS`

-- View user rights information

SELECT * FROM information_ schema.`user _ PRIVILEGES`

-- View triggers

SELECT * FROM information_ schema.`TRIGGERS`

-- View View

SELECT * FROM `information_ schema`.`VIEWS`

-- View stored procedures or stored functions

SELECT * FROM `information_ schema`.`ROUTINES`

-- View event information

SELECT * FROM information_schema.events

Note: check whether Events is enabled:

Mysql > select @ @ global.event_scheduler

Mysql > show variables like 'event_scheduler'

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report