//这里我只写一个无参无返回的存储过程 delimiter $$ create procedure 存储过程名称() begin select * from 表名;//例句 insert into 表名 values(value1,value2);//例句 create table 表名1 select * from 表名2;//例句,实现将表2的数据和字段复制(备份)到表1,前提是表1还未创建 //例句的每一条结束要写分号 end $$ delimiter ; //调用存储过程 call 存储过程名称 //调用有参的有括号存储过程看这篇,写的很好,适合小白看https://blog.csdn.net/The_RedMaple/article/details/120821053 2.springboot调用mysql中的存储过程
@Repository public interface UnibuyCategoryMapper extends CoreMapper3.fastjson中JSonObejct()和JSonArray()方法{ @Select("call 存储过程名") void procedure(); }
本想自己写的,发现一篇写的很好的文章,我他妈直接转载
https://blog.csdn.net/qq_43472877/article/details/112287780
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)