查看所有存储过程
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', 'performance_schema')
-- and r.routine_schema = 'database_name'
order by routine_schema,routine_name;、
查看所有视图
select table_schema as database_name,
table_name as vIEw_name
from information_schema.tables
where table_schema not in ('sys', 'performance_schema')
and table_type = 'VIEW'
-- and table_schema = 'database_name'
order by table_schema, table_name;