if標(biāo)簽 中的 and 問題:
通過 if 控制 動態(tài)sql 時,多個條件連接時要注意 and 的寫法。必須是 小寫的and, 大寫的AND 不識別。
<if test="name1 !=null and name2 != null"> 是正確的;
<if test="name1 !=null AND name2 != null"> 是錯誤的
if標(biāo)簽 中的 and 問題:
通過 if 控制 動態(tài)sql 時,多個條件連接時要注意 and 的寫法。必須是 小寫的and, 大寫的AND 不識別。
<if test="name1 !=null and name2 != null"> 是正確的;
<if test="name1 !=null AND name2 != null"> 是錯誤的