Mysql
 SQL >> Database >  >> RDS >> Mysql

2 modi per elencare le stored procedure in MySQL

Puoi elencare le stored procedure in MySQL usando un comando SHOW oppure interrogando information_schema.

1. SHOW PROCEDURE STATUS

SHOW PROCEDURE STATUS;
SHOW PROCEDURE STATUS LIKE 'albums%';

Rek restituisce dettagli come database, nome della procedura, autore e data di creazione.

2. information_schema.routines

SELECT routine_schema, routine_name
FROM information_schema.routines
WHERE routine_type = 'PROCEDURE'
ORDER BY routine_schema, routine_name;

Per includere anche le funzioni, rimuovi il filtro oppure mostra routine_type.