Grammar changed? Try the wrong to the skull pain
The USE of school;
DROP PROCEDURE IF the EXISTS ` aa `;
CREATE PROCEDURE aa (
IN bb INT,
OUT the dd INT)
MODIFIES SQL DATA
The BEGIN
INSERT INTO zx_class (class_name)
VALUES (bb);
The 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
CodePudding user response:
Use the INSERT is no problem, use the SELECT LAST_INSERT_ID () also no problemThis is not science how things happen
CodePudding user response:
TryThe SET @ dd:=NULL;
The SELECT LAST_INSERT_ID () into @ dd.