在MyBatis中,动态SQL标签〈if〉判断String类型的字段是否为空字符串的正确用法是()

来源:网络时间:2024-07-30 07:07:22

"在MyBatis中,动态SQL标签〈if〉判断String类型的字段是否为空字符串的正确用法是()"这道题是不是很难呢,如果不知道答案,接下来看一下小编就为大家提供一下正确答案哦。

在MyBatis中,动态SQL标签〈if〉判断String类型的字段是否为空字符串的正确用法是()

A、〈if test="userName != null and userName != '' "〉〈/if〉

B、〈if test="userName != null userName != '' "〉〈/if〉

C、〈if test="userName != null or userName != '' "〉〈/if〉

D、〈if test="userName != null || userName != '' "〉〈/if〉

正确答案:A

文章内容来源于网络,不代表本站立场,若侵犯到您的权益,可联系我们删除。(本站为非盈利性质网站) 联系邮箱:9145908@qq.com