JDBC可以一次执行多条SQL语句吗?
ppdj 2002-02-04 10:00:24 我想在同一个executeUpdate中同时执行两条语句,如
update user_baseinfo set password='888' where user_id=1
update user_baseinfo set password='888' where user_id=2
应该怎么写SQL语句,我用过以下方法,均不正确,请问名位大侠谁有好的办法,多谢。
1、
sql = "update user_baseinfo set password='888' where user_id=1\r\n/\r\nupdate user_baseinfo set password='888' where user_id=2"
2、
l = "update user_baseinfo set password='888' where user_id=1\r\n;\r\nupdate user_baseinfo set password='888' where user_id=2"