I have the following scheme:
JdbcRowSet myrs = new JdbcRowSetImpl();
myrs.setUrl("jdbc:postgresql://localhost:9999/teste");
myrs.setUsername("postgres");
myrs.setPassword("");
myrs.setCommand("select count (*) from pessoas where cpf = '12345'");
myrs.execute();
ResultSetMetaData md = myrs.getMetaData();
String columncount = //Exemplo: getColumnName(1);
if ( columncount == 12345){
return ("existe");
} if ( columncount != 12345){
return ("inexiste");
}
Does anyone know the method that would apply in place of // Example to capture the contents of column "cpf" for purposes of confirming the existence of cpf "12345"?