下面分享幾個查詢mysql存儲過程和觸發器的語句
二、相關語句2.1 觸發器
select trigger_schema as trigger_database,
trigger_name,
concat(event_object_schema, '.', event_object_table) as trigger_table,
action_order,
action_timing,
event_manipulation as trigger_event,
action_statement as 'definition'
from information_schema.triggers
where trigger_schema not in ('sys','mysql')
-- and trigger_schema = 'database_name' -- put your database name here
order by trigger_schema,
trigger_name;
說明:
select routine_schema as database_name,
routine_name,
routine_type as type,
data_type as return_type,
routine_definition as definition
from information_schema.routines
where routine_schema not in ('sys', 'information_schema',
'mysql', 'performance_schema')
-- and r.routine_schema = 'database_name' -- put your database name here
order by routine_schema,
routine_name;
說明:
後面會分享更多Linux和DBA方面内容,感興趣的朋友可以關注下!
更多精彩资讯请关注tft每日頭條,我们将持续为您更新最新资讯!