Hi,

Yes, there is such a feature, however it's a bit different than in
other databases (I didn't know other databases support it as well).
See http://h2database.com/html/performance.html#database_performance_tuning
"Prepared Statements and IN(...)":

"
Avoid generating SQL statements with a variable size IN(...) list.
Instead, use a prepared statement with arrays as in the following
example:

PreparedStatement prep = conn.prepareStatement(
    "SELECT * FROM TABLE(X INT=?) T INNER JOIN TEST ON T.X=TEST.ID");
prep.setObject(1, new Object[] { "1", "2" });
ResultSet rs = prep.executeQuery();
"

Could you tell me which database supports the IN(??) syntax? I can't
find it using Google (Google ignores "??", and searching for "IN" is
quite impossible). I did find out PostgreSQL supports a similar
feature, but not using "??".

> I saw at the end of this thread that this is possible on Oracle :
> http://forums.sun.com/thread.jspa?threadID=504838

That's interesting. I didn't know Oracle supports it. In fact it looks
similar to the H2 solution.

Regards,
Thomas

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to