mysql 5.5 phpadmin
語法改了嗎?試錯試到腦殼痛
USE school;
DROP PROCEDURE IF EXISTS `aa`;
CREATE PROCEDURE aa(
IN bb INT,
OUT dd INT)
MODIFIES SQL DATA
BEGIN
INSERT INTO zx_class(class_name)
VALUES(bb);
SET @dd = LAST_INSERT_ID();
SELECT @dd;
END
#1064 - 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 '' at line 7
uj5u.com熱心網友回復:
單用INSERT沒問題,單用SELECT LAST_INSERT_ID()也沒問題這種不科學的事情怎么發生的
uj5u.com熱心網友回復:
試試看SET @dd := NULL ;
SELECT LAST_INSERT_ID() into @dd;
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/62370.html
標籤:MySQL
