Created
December 7, 2022 10:03
-
-
Save chandra-prakash-meghwal/0732790e8b8cf48a60ec8590be6d9e79 to your computer and use it in GitHub Desktop.
Add sample customers to customers db table in mysql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
drop procedure if exists populate_customers; | |
delimiter // | |
create procedure populate_customers (in num int) | |
begin | |
declare i int default 0; | |
while i < num do | |
insert into customers (customer_id, name, email) values ((num*10)+i, concat('name', i), concat('email', i)); | |
set i = i + 1; | |
end while; | |
end // | |
delimiter ; | |
call populate_customers (500000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment