
sql 语句if函数
sql语句中的if函数使用,如果满足一个件条可以赋一个需要的值,方便代码判断 eg: SELECT *,if(ebay_excludecountrymodel.id is null,'false','true') checked FROM ebay_exshiplocation e left join ebay_excludecountrymodel on e.site=ebay_excludecountrymodel.site and e.id= ebay_excludecountrymodel.excludecountryid and ebay_excludecountrymodel.site=186 where e.site=186; SELECT `user`.realname, if(`user`.realname IS NULL , '有值' ,'无') checked from user LEFT JOIN user_other_info ON `user`.id=user_other_info.id
👁️ 阅读量:0
© 版权声明:本文《sql 语句if函数》内容均为本站精心整理或网友自愿分享,如需转载请注明原文出处:https://www.zastudy.cn/wen/1686498123a270734.html。