hanchuanchuan / goInception

一个集审核、执行、备份及生成回滚语句于一身的MySQL运维工具
https://hanchuanchuan.github.io/goInception/
GNU General Public License v3.0
1.6k stars 545 forks source link

java调用返回的resultset异常 #569

Closed lorenking closed 1 year ago

lorenking commented 1 year ago

企业微信截图_1680604849606

java中stmt.executeQuery执行返回结果异常,但是语句已经执行了,而且库中的数据已经改变。是用py和go的示例可以正常返回。 是我执行的写法有问题吗?

image 用executeUpdate就可以返回结果

lorenking commented 1 year ago

stmt.execute(sql); 或者 executeUpdate(sql); 后通过 stmt.getResultSet()可以拿到返回结果,rs.next取值。