The SQL in statement can be joined up to 1000. By default, Oracle supports 1000 in the number of in statements. This is also for SQL Performance processing, because in statements do not have good performance. In this case, it is best to use association queries for processing. If the associated query cannot implement your logic, discard the performance. Concatenate SQL statements. You can use or in to achieve (not recommended) the splicing method: Java code private static String getOracleSQLIn (List <?> Ids, int count, String field) {count = Math. min (count, 1000); int len = ids. size (); int size = len % count; if (size = 0) {size = len/count;} else {size = (len/count) + 1 ;} stringBuilder builder = new StringBuilder (); for (int I = 0; I <size; I ++) {int fromIndex = I * count; int toIndex = Math. min (fromIndex + count, len); String productId = StringUtils. defaultIfEmpty (StringUtils. join (I Ds. subList (fromIndex, toIndex), "','"), ""); if (I! = 0) {builder. append ("or");} builder. append (field ). append ("in ('"). append (productId ). append ("')");} return StringUtils. defaultIfEmpty (builder. toString (), field + "in ('')");}