解:
1,分割SQL语句为select a from b where c in(,,,,,,,) or c in (,,,,,,,,,) or c in (,,,,,,,,,),......
保证每个括号内个数不超过一千,就可以。执行效率可能比较低下。
2,建立一个中间的temp表存在查询条件,在数据库内部进行直接查询
select * from table_1 where column_1 in ( select column_2 from table_2_temp )
3,如果IN里面的数据是从别的表取的话,可以直接这样编写sql语句
select * from table_1 where column_1 in ( select column_2 from table_2 ,....... )