我在 Mysql 中执行以下过程。
DROP procedure IF EXISTS `wm_batch_list`;
DELIMITER $$
/*!50003 SET @TEMP_SQL_MODE=@@SQL_MODE, SQL_MODE='STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ $$
CREATE DEFINER=`root`@`localhost` procedure `wm_batch_list`(IN p_start int(11),IN p_range int(11))
BEGIN
select * from batch ORDER BY start_year DESC limit p_start,p_range;
END $$
/*!50003 SET SESSION SQL_MODE=@TEMP_SQL_MODE */ $$
DELIMITER ;
但我收到此错误:
Error code 1064, SQL state 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 'p_start,p_range;
END' at line 3
请建议我在哪里做错了?