ifnull没有生效


select 

  IFNULL(Qty*ItemNetWeight,0) Weight,

  IFNULL(ItemUomCode,0) code

  FROM t_oc_transferorderline  

  where HeadID in(

  select id FROM t_oc_transferorderheader where OrderType in ('ZR08')

  )  

  and DATE_FORMAT(CreateTime,'%Y-%m-%d')=DATE_FORMAT('2016-11-08','%Y-%m-%d')

select ifnull(orderNO,0) from t_oc_transferorderheader;http://img.mukewang.com/582930080001bddf08570323.jpg


qq_王力_0
浏览 1625回答 0
0回答
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

MySQL