Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to iterate data into MySQL stored procedures

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly explains "MySQL stored procedures how to cycle into data", the content of the article is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "MySQL stored procedures how to cycle into data" bar!

The absolute values of inset and alert are often tested when testing the machine, so a stored procedure is written to complete it.

DROP PROCEDURE IF EXISTS proc_buildata

Tudou@Gyyx

CREATE PROCEDURE proc_buildata (IN loop_times INT)

BEGIN

DECLARE var INT DEFAULT 0

PREPARE MSQL FROM 'CREATE TABLE IF NOT EXISTS `employee` (`id` int (10) unsigned NOT NULL AUTO_INCREMENT, `employeeid` int (10) unsigned NOT NULL COMMENT' 0employees employees, `employeename` varchar (64) NOT NULL DEFAULT', PRIMARY KEY (`id`)) ENGINE=InnoDB'

EXECUTE MSQL

WHILE var

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report