Before Insert Trigger not firing DELIMITER $$
CREATE TRIGGER `merchant_insert` BEFORE INSERT ON `merchant_table` FOR EACH ROW 
BEGIN
  INSERT INTO merchant_seq VALUES (NULL);
  SET NEW.merchant_id = CONCAT('MC', LPAD(LAST_INSERT_ID(), 10, '0'));
END $$
DELIMITER ;
INSERT INTO merchant_seq VALUES (NULL);
SET @last_ID = (SELECT MAX(merchant_id) FROM merchant_seq);
SET NEW.merchant_id = CONCAT('MC', LPAD(@last_ID, 10, '0'));