开发者

Check for unique row existence via jdbc

I'm using resultSet.next() to check whether a unique row exist in the database or not. But it is returning false even when the row exists in the database.

Can anyone explain the first comment of the first answer of this page?.开发者_JS百科


If there is any row in the database which you are expecting, then first call to resultSet.next() should return true.

Answer on this page. If you are expecting only one row to be returned from database then first call to resultSet.next() will return true and any furter call will return false. First next() call on resultSet takes cursor to the first row.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜