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函数的返回值并不表示查询成功或者失败。

posted @ 2021-01-22 08:58  Demo4  阅读(578)  评论(0编辑  收藏  举报