0

En PostgresSQL yo podía levantar excepciones desde un trigger con el Raise Exception, por eso pregunto: ¿cómo puedo mostrar un mensaje desde un trigger como lo hacía en Postgres con el Raise Exception en MySQL?

1 respuesta 1

1

Pon este texto y saldra un mensaje

DECLARE
  msg VARCHAR(255);

SET msg = CONCAT('La fecha no puede ser anterior a ', NOW());
SIGNAL SQLSTATE '45000' SET message_text = msg;

Tu Respuesta

By clicking “Publica tu respuesta”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

¿No es la respuesta que buscas? Examina otras preguntas con la etiqueta o formula tu propia pregunta.