I am getting a SQLException when I try to run the query in Informix DB using JDBC. The query is huge in size:
select * table_name where tableid in (....)
开发者_如何学编程
I get an exception because the 'in' part contain more than 5000 values and because of the length. Is there a way to avoid this or should I break it down and run two queries?
Create another table with the >5000 tableid
s.
Then all that's left is an inner-join:
select t.*
from table_name t
inner join table_tableid tid
on tid.tableid = t.tableid
精彩评论