0
点赞
收藏
分享

微信扫一扫

sql if条件语句的判断

陬者 2022-03-18 阅读 52
sql
//判断前端传来的搜索条件值是否为null,如果为null,1=1;如果不为null,supplier_id=#{supplierId}
where if (#{supplierId} is not null,b.supplier_id=#{supplierId},1=1)
举报

相关推荐

0 条评论