当前位置:网站首页>MySQL uses stored procedures to add data
MySQL uses stored procedures to add data
2022-04-22 13:19:00 【Celestial body_】
DELIMITER $$
# Create a stored procedure name tt
CREATE PROCEDURE tt()
BEGIN
# Define a int Variable i
DECLARE i INT;
# to i assignment
SET i=1;
# The loop condition
WHILE i<500 DO
# Add sentences
INSERT INTO `zx`.`vip` (`vname`,`vdate`,`card_item_id`,`stored_value_pirce`,`stored_value_consume`,`stored_value_sum`,`amount_of_product`, `product_consumption`,`product_information`, `debt`,`remark`, `vid`, `consume`,`vshop`,`stamptemp`) VALUES ( 'vname',NOW() ,'fcc6ecab-bfde-11ec-836e-98fa9b223a51',i, i, i, i, i,i,i,'remark', UUID(),'1','vshop','stamptemp' ) ;
# Each cycle i+1
SET i=i+1;
# end
END WHILE;
END;
$$
# Calling stored procedure
CALL tt();
# Delete stored procedure
DROP PROCEDURE tt;
版权声明
本文为[Celestial body_]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204221306583601.html
边栏推荐
- The difference between let, const and VaR
- ROS2——什么是接口
- mysql FUNCTION xxx.charindex does not exist
- OPLG:新一代云原生可观测最佳实践
- B站砍向直播,迟早的事
- redis内存使用info memory命令参数解析
- Ros2 - what is an interface
- The keys of redis have become backup and the values have disappeared. Why?
- 上市公司营业收入数据集(1990-2021第三季度)
- Heterogeneity and stability data of senior management team (including code, calculation process and original data)
猜你喜欢

Oplg: new generation cloud primary observable best practices

中英文会计&金融情绪词典

难得盈利或是昙花一现,达芙妮学不会南极人

Xen热修复技术(基础了解)

SQL database operation of C (source code)

奈飞大跌3500亿,爱优腾能靠涨价走出困境吗?

Rsync remote synchronization

Ros2 - teach you how to write a service

Communication principle of SPI protocol

Sprint strategy for soft test preparation in the first half of 2022
随机推荐
原来,这才是开发者打开世界读书日的正确姿势!
From construction to governance, the industry's first white paper on microservice governance technology was officially released (including a free download link)
Summary of maximum matching number, minimum path coverage number, maximum independent number and minimum point coverage number theorems
ROS机器人学习——TF坐标变换
Get rid of the "small workshop" of AI production: how to build a cloud native AI platform based on kubernetes
销量大腰斩,岚图无蓝图
STM32CubeMX重定向printf输出至串口
MapReduce case - reverse order of uplink traffic (descending order)
Rust实现斐波那契数
Model based RL概述
MySQL8.0学习记录08 - 数据类型默认值
ROS2——什么是接口
高管团队异质性和稳定性数据(含代码、计算过程及原始数据)
Rsync remote synchronization
RT-Thread配置SPI-Flash(W25Q256)
Oracle NetSuite 客户说 | 让中影巴可流程控制更精细的“核心秘籍”
待学习知识
Corners of enterprise mailbox
Compressed backup of raspberry pie
树莓派压缩备份