Sql like ResultSet and PreparedStatement