How to handle an Empty IN clause inside a SQL Select Statement (IBatis 2)?
问题 I have written the following SQL Statment in IBatis version 2: <select id="mySelect" resultClass="long" > SELECT COUNT(*) FROM myTable WHERE myTable.columnA IN <iterate property="myInClauseValues" open="(" close=")" conjunction=","> #myInClauseValues[]# </iterate> </select> That statement works fine, if myInClauseValues (this is a ArrayList with Long) include at least one value. But if myInClauseValues is empty, I get an error message like this (I´m using an oracle database): Check the