Statement.execute()

@return true if the first result is a ResultSetobject; false if it is an update count or there are no results;

当返回的是一个结果集,表示为真反之,即当执行查询操作的时候,返回true,当返回的是一个更新计数,或没有没有返回结果的时候,返回false。

即:execute函数的返回值并不表示查询成功或者失败。

原文地址:https://www.cnblogs.com/baicia/p/14311481.html