美文网首页
向数据库快速插入大量测试数据

向数据库快速插入大量测试数据

作者: 想像风一样的陈某 | 来源:发表于2019-06-11 16:15 被阅读0次

1/分析被测试表字段

如:测试test_table表中有 id,username,user_pwd 3个字段

2/创建存储过程

    create procedure insert_test()  创建存储过程

    begin

    set @a=1;

    while @a<1000 do

    insert into test_table values(@a,'chen','cf123456');

    set @a=@a+1;

    end while;

    end;

    call insert_test();   #执行

3/执行

相关文章

网友评论

      本文标题:向数据库快速插入大量测试数据

      本文链接:https://www.haomeiwen.com/subject/bkpffctx.html