mysql中迅速插入百萬條測試數據的方法

BEGIN
    #Routine body goes here...
    declare i decimal (10) default 0 ;
    dd:loop
    INSERT INTO `table` ( `title`, `status`, `inputtime`, `content`) VALUES ('1', '1', '1', '1');
    commit;
    set i = i+1;
    if i= 1000000 then leave dd;
    end if;
    end loop dd ; 
END
相關文章
相關標籤/搜索