Solutions for handling Oracle SQL in over 1000 ,..., 1000,100). If the clause contains more than 1000 entries, an error is returned. This is mainly because of oracle's restrictions on performance. If you want to solve the problem, you can use where id (1, 2 ,..., 1000) or id (1001 ,...) www.2cto.com [java]/*** <B> function: </B> process the in clause of an oracle SQL statement (where id in (1, 2 ,..., 1000,100 1), * if the clause contains more than 1000 items, an error is returned. * This is mainly a limitation on oracle's consideration of performance issues. * If you want to solve the problem, you can use where id (1, 2 ,..., 1000) or id (1001 ,...) * @ author hoojo * @ createDate 02:36:03 * @ param ids in the Set object * @ param count in the statement number of conditions * @ param field in the statement corresponding to the Database Query field * @ return returns field in (...) or field in (...) string */private 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 {www.2cto.com 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); // System. out. println (ids. subList (fromIndex, toIndex ); String productId = StringUtils. defaultIfEmpty (StringUtils. join (ids. subList (fromIndex, toIndex), "','"), ""); if (I! = 0) {builder. append ("or");} builder. append (field ). append ("in ('"). append (productId ). append ("')");} return StringUtils. defaultIfEmpty (builder. toString (), field + "in ('')");}