mysql trigger not working with if statement
You have to change DELIMITER to something else than ;

DELIMITER $$
CREATE TRIGGER updateNewEmp AFTER UPDATE ON BasicDetails FOR EACH ROW  
BEGIN
  IF(NEW.MiddleName&lt;&gt;OLD.MiddleName) 
  THEN
    INSERT INTO BasicDetails_audit(MiddleName,`State`,Country,Community) 
         VALUES (NEW.MiddleName,NEW.`State`,NEW.Country,NEW.Community);
  END IF;
END$$
DELIMITER ;