select * from student 1.动态语句中的prepend属性<dynamic prepend="where"> <isNotNull property="id" prepend="and"> id = #id# </isNotNull> <isNotNull property="name" prepend="and"> name like '%$name$%' </isNotNull> </dynamic> prepend是添加在动态语句的前面 <dynamic>标签中首个prepend被忽略. <isNotNull property="id" prepend="and">标签中必须加prepend="and"因为如果不加的话, <isNotNull property="name" prepend="and">此标签中的prepend="and"中的and会被忽略. 2.like模糊查询 '%$name$%' 3.<isNotNull>标签与<isNotEmpty>标签的区分 |
|