1、like的使用:
在数据库软件中进行测试时,书写的格式是:
比如:
select * from fdx.dbo.[User] where 1=1 and name like '%'+'a'+'%'//查找名字中含有'a'的所有用户的信息
在sql语句的配置文件中,需要书写的配置sql语句如下:
//一、like模糊语句的书写<isNotEmpty prepend="and" property="orderid">OrderId like '%' + #orderid:VARCHAR# + '%'</isNotEmpty>//二、某个时间段sql语句的书写<isNotEmpty prepend="and" property="orderdatestart"><![CDATA[ orderdate >= #orderdatestart:TIMESTAMP# ]]></isNotEmpty><isNotEmpty prepend="and" property="orderdateend"><![CDATA[ orderdate <= #orderdateend:TIMESTAMP# ]]></isNotEmpty>【时间格式的书写是一定的:<![CDATA[ ........时间段的限定]]>】