Go directly to SQL. The idea is very simple
select * from test_table
where 1 = 1
<!-- IdList -->
<if test="IdList != null and IdList.size > 0">
AND PK_ID IN
<!-- Handle the case where Oracle does not support in when the set of in exceeds 1000 entries -->
<trim suffixOverrides=" OR PK_ID IN()"> <!-- means delete the last condition -->
<foreach collection="IdList" item="Id" index="index" open="(" close=")">
<if test="index != 0">
<choose>
<when test="index % 1000 == 999">) OR PK_ID IN (</when>
<otherwise>,</otherwise>
</choose>
</if>
#{Id}
</foreach>
</trim>
</if>
Read More:
- postgresql-Database query problem-ERROR: column “t.domainid“ must appear in the GROUP BY clause or be used in an a
- How to release Oracle PLSQL data lock table
- How to quickly locate the problem in DB2-407 error reporting SQLCODE: -407, SQLSTATE: 23502
- Solve MySQL table can not query, modify, delete and other operations and appear stuck
- Dbeaver connects hive to solve the problem that hive custom UDF functions cannot be used in SQL queries in dbeaver
- Oracle-OrcleInstanctClient Install ODBC Error: Oracle ODBC Driver with same name already exists
- [Solved] Running in 64 bit mode with the 32 bit Oracle client installed
- Mongoose: How to delete all documents in collection
- How to Solve mysql [Err] 1067-Invalid default value for
- How to Solve Navicat open view error
- ORA-29913 ORA-06512 external table query prompt: error
- How to Solve Error: Rsa Public Key not Find
- How to Solve Nacos startup error
- [Solved] Error Code: 2013. Lost connection to MySQL server during query
- How to Solve c3p0 connect mysql8.0 Error
- How to Solve mysqld — console command error
- How to Solve MYSQL into outfile Error13
- How to Solve Azkaban startup error
- Kettle stores data report ora-00600 to Oracle: internal error parameters [KQD object $], [u], [0], [107], [CS], []
- (Fixed) workbench MySQL Error Code: 2013. Lost connection to MySQL server during query