前言
Learn stored procedures
实例
- Query and return parameters
Reference: https://blog.csdn.net/qq_39190679/article/details/100132474
BEGIN
#Routine body goes here...
select id from t_user_info where id = n;
END
- Bulk Insert I
can’t find any specific implementation reference, but this article is well written, so I
posted the article: https://blog.csdn.net/BADAO_LIUMANG_QIZHI/article/details/87855148
BEGIN
declare i int default 1;
start transaction; #开启事务
while i <= 1000000 do
insert into test_indexes
values(i, concat("张天爱-", i), '测试字段', '测试字段', '测试字段', '测试字段', '测试字段', '测试字段', '测试字段', '测试字段');
set i = i+1;
end while;
commit;
END