基本命令
#声明变量 DECLARE a INT; #对变量赋值 SET a = 5;
基本使用
创建存储过程
CREATE PROCEDURE p8 () BEGIN DECLARE a INT; DECLARE b INT; SET a = 5; SET b = 5; INSERT INTO user(name, age) VALUES (a,b); END;
调用存储过程
call p8();
2023-08-03 13:53:52
#声明变量 DECLARE a INT; #对变量赋值 SET a = 5;
创建存储过程
CREATE PROCEDURE p8 () BEGIN DECLARE a INT; DECLARE b INT; SET a = 5; SET b = 5; INSERT INTO user(name, age) VALUES (a,b); END;
调用存储过程
call p8();