01 | package com.jiang.Util; |
02 |
03 | import java.io.File; |
04 | import java.io.FileOutputStream; |
05 | import java.io.IOException; |
06 |
07 | /** |
08 | * @author Administrator |
09 | * 用来生成测试数据 |
10 | */ |
11 | public class CreateSql { |
12 | public static void main(String[] args) { |
13 | FileOutputStream fos = null ; |
14 | try { |
15 | fos = new FileOutputStream( new File( "auto.sql" )); |
16 | for ( int i = 0 ; i < 10000 ; i++) { |
17 | // insert into pagetest values(1,'11',22,'33','44'); |
18 | String sql = "insert into pagetest values(" + i + ",'" + i |
19 | + "'," + i + ",'" + i + "','" + i + "');\n" ; |
20 | fos.write(sql.getBytes()); |
21 | System.out.print(sql); |
22 | } |
23 | } catch (Exception e1) { |
24 | // TODO Auto-generated catch block |
25 | e1.printStackTrace(); |
26 | } finally { |
27 | if (fos!= null ){ |
28 | try { |
29 | fos.close(); |
30 | } catch (IOException e) { |
31 | // TODO Auto-generated catch block |
32 | e.printStackTrace(); |
33 | } |
34 | } |
35 | } |
36 | } |
37 | } |

余 LV1
2021年6月26日
seagullliwei LV1
2021年2月18日
lclinlclin LV14
2021年1月25日
129448 LV1
2020年5月25日
adminxu LV13
2020年5月3日
18035189975 LV1
2020年3月18日
zhourunfav LV1
2019年12月12日
ss1522886278 LV2
2019年12月11日
guysma LV1
2019年11月15日
messiaaaaa LV1
2019年10月18日