Ver Mensaje Individual
  #1 (permalink)  
Antiguo 29/04/2016, 05:51
alfa18
 
Fecha de Ingreso: diciembre-2007
Mensajes: 299
Antigüedad: 17 años, 3 meses
Puntos: 2
problemas con triggers

hola amigos,
tengo problemas con este trigger y no veo donde esta el error ¿me echais una mano?

el trigger en cuestion es este:
Código MySQL:
Ver original
  1. CREATE TRIGGER k2 BEFORE INSERT ON k FOR EACH ROW BEGIN IF District IS NULL OR District= '' THEN SET NEW.District='Unknown';end if;

.. y los errores que obtengo son estos:
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'end if' at line 1
__________________
1os pasaos con xAMP en Windows
programando en PERL