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.
精彩评论