iBatis: Support for Array or List Parameter with SQL IN Keyword
来源:互联网 发布:js中map查询用法 编辑:程序博客网 时间:2024/04/28 09:59
iBatis: Support for Array or List Parameter with SQL IN Keyword
出处:
http://twit88.com/blog/2008/03/14/ibatis-support-for-arrays-or-list-parameters-in-with-sql-in-keyword/
By admin on Mar 14, 2008 in Java, Programming
Related posts in this website for your search
- Java: Insert a BLOB Object Using iBATIS
- Load Data into Database without Creating Java Data Object
- SELECT COUNT in Database
- iBatis and Apache DBCP Connection Pooling
- Java: Alter Oracle Session Information using iBATIS
This is a feature available in iBatis but it is not mentioned in the documentation. You can find the example in the iBatis source code under the unit tests.
Let’s said I need to run the following SQL statement
select * from my_table where col_1 in ('1','2','3')
So how do I pass in the values of 1, 2 and 3 ?
In this case you need to pass in a list parameter. The correct iBatis syntax should be
And in Java you should pass in a java.util.List. E.g.
This is another example
…
- iBatis: Support for Array or List Parameter with SQL IN Keyword
- ibatis select in property with array
- 基本keyword in SQL
- org.apache.ibatis.type.TypeException: Error setting null for parameter #1 with JdbcType OTHER
- Shuffle an Array or a List - Algorithm in Java
- iBATIS SQL Maps之Parameter Map。
- iBATIS SQL Maps之Inline Parameter Map。
- Setting parameter value for binding with code
- vc C2085 not in formal parameter list
- Open Win32 App in C#, with extern keyword
- Ibatis 动态映射(基本用法,Iterate实现in查询,Or查询,Sql注入例子)
- SQL support for dynamic schema
- Exception in thread "main" org.hibernate.AnnotationException: List/array has to be annotated with an
- Array in PL/SQL
- List and Array in Perl
- distinguish "list" & "array" in python
- Detect CSS3 Support in Browsers with JavaScript
- ffmpeg compile with neon support for android
- GLOBAL和LXR比较
- vc坐标系
- 轻松掌握Ajax.net系列教程十二:使用TabContainer&TabPanel
- 为有.net技术基础且英文不怎么好的同学推荐一本C#4.0好书
- 反映中国作坊式管理软件公司问题的《老板看后一夜没睡的辞职信》
- iBatis: Support for Array or List Parameter with SQL IN Keyword
- 轻松掌握Ajax.net系列教程十三:使用HoverMenuExtender
- linux-备份硬盘的分区信息:
- 轻松掌握Ajax.net系列教程十四:使用CalendarExtender
- VxWorks6.7注册机
- 新技术值得相信
- 轻松掌握Ajax.net系列教程十五:使用AutoCompleteExtender
- 轻松掌握Ajax.net系列教程十五:使用AutoCompleteExtender
- 轻松掌握Ajax.net系列教程十六:使用DropDownExtender