The produced output is:Connection con = getConnection();
System.out.println("Wrong result:");PreparedStatement stmt = con.prepareStatement("WITH recursive t(f) AS ( "+" SELECT 1 "+" UNION ALL "+" SELECT t.f + 1 "+" FROM t "+" WHERE t.f < ? "+") "+"SELECT t.f "+"FROM t ");stmt.setInt(1, 10);ResultSet rs = stmt.executeQuery();while (rs.next())System.out.println(rs.getInt(1));System.out.println("Correct result:");rs = con.createStatement().executeQuery("WITH recursive t(f) AS ( "+" SELECT 1 "+" UNION ALL "+" SELECT t.f + 1 "+" FROM t "+" WHERE t.f < 10 "+") "+"SELECT t.f "+"FROM t ");while (rs.next())System.out.println(rs.getInt(1));
Wrong result:1Correct result:12345678910
Wrong result:null
--
You received this message because you are subscribed to the Google Groups "H2 Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to h2-database...@googlegroups.com.
To post to this group, send email to h2-da...@googlegroups.com.
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "H2 Database" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/h2-database/OJfqNF_Iqyo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to h2-database...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to h2-database+unsubscribe@googlegroups.com.
To post to this group, send email to h2-da...@googlegroups.com.
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.