如何使用Spring执行多条sql语句
在Spring中可以使用ScriptUtils工具类,批量执行Sql语句,如批量执行update table1 set status=0, dprice=55 where id in (9600980);insert into table1 (dprice,status) values(46,0),(55,1);这两条语句。
方法
|
|
Via
在Spring中可以使用ScriptUtils工具类,批量执行Sql语句,如批量执行update table1 set status=0, dprice=55 where id in (9600980);insert into table1 (dprice,status) values(46,0),(55,1);这两条语句。
|
|