USE project;
DROP PROCEDURE IF EXISTS project.delete_test_user;
delimiter $$
CREATE PROCEDURE project.delete_test_user()
BEGIN
set @vUser=1;
#test_user~9 删除用户信息表中数据
while(@vUser<=10)
do
set @vSqlStr=concat('delete from `test_user_',@vUser%10,'`');
prepare stmt from @vSqlStr;
execute stmt;
deallocate prepare stmt;
COMMIT;
set @vUser=@vUser+1;
end while;
end $$
delimiter ;
CALL project.delete_test_user();