当前位置:网站首页>MySQL 使用存储过程添加数据
MySQL 使用存储过程添加数据
2022-04-22 13:07:00 【天体_】
DELIMITER $$
#创建一个存储过程 名字tt
CREATE PROCEDURE tt()
BEGIN
#定义一个int 变量 i
DECLARE i INT;
#给i赋值
SET i=1;
#循环条件
WHILE i<500 DO
#增加语句
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' ) ;
#每次循环i+1
SET i=i+1;
#结束
END WHILE;
END;
$$
#调用存储过程
CALL tt();
#删除存储过程
DROP PROCEDURE tt;
版权声明
本文为[天体_]所创,转载请带上原文链接,感谢
https://blog.csdn.net/qq_41740369/article/details/124311310
边栏推荐
- R language uses the scale function to standardize and scale dataframe data (set the scale parameter, divide the scale parameter setting by the standard deviation)
- 借助数商云房地产行业采购平台解决方案,实现简单、智能、合规的采购
- ROS2——参数的使用
- Ros2 - what is an interface
- Excel表格中如何批量删除工作表
- Sprintf format string
- 手把手教你配置哔哔点啥
- Leetcode 206, reverse linked list
- 难得盈利或是昙花一现,达芙妮学不会南极人
- R语言编写决策曲线DCA(Decision Curve Analysis)函数、多条决策曲线分析DCA曲线可视化在同一图像中
猜你喜欢

ORB_ Slam3 learning: introduction to tracking thread

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

There are four ways to traverse the mat class matrix elements of OpenCV

SQL database operation of C (source code)

Sprintf format string

Use opencv's function threshold () to threshold the image based on Otsu - and attach a good blog link to introduce the principle of Otsu

One sentence of code prints out the data of the mat object of OpenCV

抖音快手卧榻之侧,黄光裕难以酣睡

数商云电子招投标系统解决方案丨规范政采流程,提高工作效率

一句代码将OpenCV的Mat对象的数据打印输出
随机推荐
The design method and type of flexible printed circuit board (PCB) are analyzed in detail
Calloc and realloc
详解为什么OpenCV的直方图计算函数calcHist()计算出的灰度值为255的像素个数为0
借助数商云房地产行业采购平台解决方案,实现简单、智能、合规的采购
MATLAB的二维线图绘图函数plot()实例积累
Chrome多设备书签同步方案
R语言编写决策曲线DCA(Decision Curve Analysis)函数、多条决策曲线分析DCA曲线可视化在同一图像中
一句代码将OpenCV的Mat对象的数据打印输出
销量大腰斩,岚图无蓝图
Ros2 - use of parameters
R语言多条决策曲线分析DCA(Decision Curve Analysis)曲线可视化在同一图像中、使用png函数将决策曲线分析DCA可视化结果保存为png格式
How to use colormaps and customize your favorite colorbar?
JS box moves with the mouse when clicked
ROS机器人学习——麦克纳姆轮运动学解算
ROS2——手把手教你编写一个服务
Day code 300 lines learning notes day 47
Download and installation of redis
RT thread configuration SPI flash (w25q256)
Leetcode 695. Maximum area of the island
With the help of digital business cloud real estate industry procurement platform solution, realize simple, intelligent and compliant procurement