开发者

SQLException in JDBC

开发者 https://www.devze.com 2022-12-17 17:42 出处:网络
I am getting a SQLException when I try to run the query in Informix DB using JDBC.The query is huge in size:

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 tableids.

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
0

精彩评论

暂无评论...
验证码 换一张
取 消