Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to implement the greater than or equal SQL statement in iBatis?

Tags:

Let's say in my sql statement I want to do:

WHERE numberOfCookies >= 10  

How do I do this in iBatis?

like image 954
Stephane Grenier Avatar asked Jan 07 '10 20:01

Stephane Grenier


2 Answers

Because the SQL is written in xml, you cannot just use the symbol ">", you need to write it as:

WHERE numberOfCookies >= 10 

Update:

> for greater than

< for less than

like image 184
Stephane Grenier Avatar answered Oct 11 '22 06:10

Stephane Grenier


Why does it not work?

The only thing I can think of is that the > character isn't playing nice with the XML. In which case, you can wrap the entire statement within <![CDATA[ ... ]]>

like image 28
Tinister Avatar answered Oct 11 '22 06:10

Tinister