mysql 存储过程 造数

DROP PROCEDURE IF EXISTS create_user_tel;

create procedure create_user_tel(n int)
begin
    declare id int;
    set id=1;
while id <=n
    do
        INSERT INTO alam VALUES(id, '');
        set id=id+1;
    end while;
end;

call create_user_tel(10);


TRUNCATE table  alam

select COUNT(1) from  alam

 

posted @ 2024-07-19 15:08  AlamZ  阅读(9)  评论(0编辑  收藏  举报