必须先插入工具包
DataSource ds = JdbcHelper.getDs();
System.out.println(ds);
JdbcTemplate jdbcTemplate=new JdbcTemplate(ds);
System.out.println(jdbcTemplate);
String sql1="insert into biao values(null,?,?,?)";
int i=jdbcTemplate.update(sql1,"6",6,"6");
System.out.println(i);
String sql2="delete from biao where id=?";
int a=jdbcTemplate.update(sql2,"2");
System.out.println(a);
String sql3="update biao set name=? where id=2";
int b=jdbcTemplate.update(sql3,"小军");
System.out.println(b);
String sql4="select *from biao where id=?";
Map<String, Object> stringObjectMap = jdbcTemplate.queryForMap(sql4,3);
System.out.println(stringObjectMap);
String sql5="select * from biao where id>?";
List<Map<String, Object>> maps = jdbcTemplate.queryForList(sql5, 5);
System.out.println(maps);