[英]JDBC identify getUpdateCount() is update or insert or delete
该语句具有getUpdateCount()
方法,但是如何识别它是更新,插入还是删除操作?
You can get the original Statement
from the ResultSet
by using resultSetInstance.getStatement (), cast it to a PreparedStatement , whose toString() method spits out the original statement as a String . 您可以使用resultSetInstance.getStatement ()从
ResultSet
原始Statement
,并将其转换为PreparedStatement ,该对象的toString()方法将原始语句作为String吐出。 From here, it's just checking the statement itself. 从这里开始,它只是检查语句本身。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.