Getting Boolean from ResultSet

Priv :

ResultSet#getBoolean seems to return false when it's null.
Is there an easy way to get a Boolean (not boolean) from a ResultSet?

uoyilmaz :

You can call wasNull after calling getBoolean. It's explained here: https://docs.oracle.com/javase/7/docs/api/java/sql/ResultSet.html#wasNull%28%29

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=456008&siteId=1