Funcions emmagatzemades
Salta a la navegació
Salta a la cerca
Contingut
Funcions emmagatzemades
NOTA. Per crear funcions s'ha de tenir permisos de SUPER. Evidentment l'usuari root té aquests permisos, i per tant pots crear les teves funcions amb l'usauri root. Si vols crear les funcions amb l'usuari alumne se li han d'atorgar els permisos:
mysql> GRANT SUPER ON *.* TO alumne@localhost
Per crear procediments això no és necessari.
Com llegim a la documentació oficial:
CREATE PROCEDURE and CREATE FUNCTION require the CREATE ROUTINE privilege. If the DEFINER clause is present, the privileges required depend on the user value, as discussed in Section 25.6, “Stored Object Access Control”. If binary logging is enabled, CREATE FUNCTION might require the SUPER privilege, as discussed in Section 25.7, “Stored Program Binary Logging”.
Eliminar funcions
Llistar funcions emmagatzemades
Stored procedures que retornen múltiples valors
creat per Joan Quintana Compte, març 2022