question: public int retrieveRowCount ( String tableName ) throws SQLException { ResultSet rs = null ; int rowCount = - 1 ; try { rs = statement . executeQuery ( "SELECT COUNT(*) FROM " + tableName ) ; rs . next ( ) ; rowCount = rs . getInt ( 1 ) ; } finally { if ( rs != null ) { rs . close ( ) ; } } return rowCount ; }
target:  Does a COUNT on a given table.