oracle in
来源:互联网 发布:数据库原理及应用教程 编辑:程序博客网 时间:2024/05/18 22:15
转载:http://blog.csdn.net/xb12369/article/details/18264663
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 {
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 ('')");
}
- oracle in
- Oracle:in/Not in操作
- ROWNUM used in ORACLE
- Temp Table in Oracle
- oracle的 not in
- Database link in Oracle
- Guid in oracle
- ROWNUM in Oracle SQL
- xml function in oracle
- Ajax in Oracle JDeveloper
- Sun in Oracle
- oracle exists和in
- oracle in exist 比较
- Locks in Oracle
- Joins in Oracle
- Hide Code in Oracle
- oracle 中的IN,LIke
- TimeZones in Oracle
- iOS AppStore企业账号打包发布APP流程详解
- 反射获取对象的属性名和对应的值并转为json字符串
- IT忍者神鬼之HTTP长连接和短连接
- 修改tomcat默认war包存放地址
- 第11周项目-阅读程序,写结果2
- oracle in
- JAVA设计模式初探之适配器模式
- win7+Ubuntu双系统安装遇到的问题
- 无法使用内置管理员账户打开的终极解决方法
- Handler,MessageQueue,Runnable,Looper
- adb shell 命令详解
- 将Word文件快速转换为PPT文稿
- Python序列类型操作符和内建方法
- datafactory案例分析(4个)