CREATE TRIGGER `ins_nyersRaktar_dateCheck` BEFORE INSERT ON `nyers_raktar` FOR EACH ROW BEGIN IF NEW.atvetel > NEW.lejarat THEN SIGNAL sqlstate '45001' set message_text = "A termek mar lejart."; END IF; END$$