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
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;