I am constructing the query string in code and the easiest way I see to add new parameters is to add subqueries something like this:
query = "SELECT * FROM table";
query = "SELECT * FROM (" + query
+ MessageFormat.format(" ) as subquery where x = {0}", y);
query += ";";
So I might have quite a lot of such subqueries at the end and I wonder if there is a limit I might hit.
select * FROM( select * FROM(select * from t) a ) b;can be reduced to a plainselect * from t;