1、先在数据库中创建一个存储过程
DROP PROCEDURE IF EXISTS SQLoperation;
create PROCEDURE SQLoperation()
BEGIN
insert into userinfo(userid,username,userpassword) values('6','cyt','cyt123');
update userinfo set USERPASSWORD='123456' where USERID='6';
select * from userinfo WHERE USERNAME='cyt';
delete from userinfo where USERID='6';
END
2、将之前写sql语句的地方改成cal 存储过程名就ok了