DELIMITER ;;CREATE TRIGGER `article_add` BEFORE INSERT ON `t_article` FOR EACH ROW beginSet NEW.orderBy=(select max(id)+1 from article);end;;DELIMITER ;