Spring jdbctemplate IN 的使用
2016-06-27 13:58
351 查看
Spring jdbctemplate IN 的使用
StringBuffer sbf = new StringBuffer(); sbf.append("DELETE "); sbf.append("FROM "); sbf.append("def_vip_album "); sbf.append("WHERE "); sbf.append("VIP_CODE = ? AND CORP_CODE = ? AND ID in ( "); if(images.size() == 1){ sbf.append(images.get(0)); }else{ sbf.append(id); } sbf.append(" ) "); 》》》》》》参数
String[] ids = id.split(","); List<String> images = new ArrayList<String>(); for (int i = 0; i <ids.length ; i++) { images.add(ids[i]); }
相关文章推荐
- 如何使用 Linq to Entity 实现 in 操作
- 在网页中使用Winform控件,并调整其大小(using Winform control in ASP.NET and adjust its size)
- Mybatis 中sql 使用in(#{item})无法查询解决办法
- 使用hadoop时出现“Name node is in safe mode” 提示
- mysql中find_in_set()函数使用
- mysql中exists与in的使用
- Struts2.3.20使用token防表单重复提交:警告: Could not find token name in params.
- 使用slidingmeu_actionbarsherlock_lib的问题和The hierarchy of the type MainActivity is inconsistent
- 使用componentsSeparatedByCharactersInSet:方法限定输入字符的格式
- 使用eclipse编程出现Use View.isInEditMode() in your custom views to skip code when shown in Eclipse解决方法
- 避免使用不必要的float(display:inline,position:relative)
- SQL使用经验 IN 还是 EXISTS的选用,哪个性能更好
- Windows Azure Cloud Service (43) 使用Azure In-Role Cache缓存(2)Dedicated Role
- ibatis 使用 in 查询的几种XML写法
- Effective JavaScript Item 49 对于数组遍历,优先使用for循环,而不是for..in循环
- MyBatis中in 的使用
- Thinking in C++ ----第二章 对象的创建和使用
- 浅析MySQL中exists与in的使用
- How to use bitBucket with EGit in Eclipse,如何在Eclipse中使用bitbucket远程仓库
- GetComponentsInChildren(); 使用方法