DELIMITER //
create procedure pro_getUserName(runName varchar(20));
BEGIN
start transaction;
update running set runnumble + 1 where runname = runname;
commit;
select * from running where runname = runname;
END //
DELIMITER;
call p_username("123");
存储过程语法:
";"不代表指令结束,DELIMITER是";"的意思
只有收到"//"才会认为指令结束
执行存储过程使用call命令,其实是先执行的drop然后再create
在MYSQL中没有修改存储过程的命令,执行alter procedur汇报错