在下面的查询中,我想将“百分比”值0
设为NULL
. 但是,我似乎无法弄清楚如何IFNULL
正确地将函数包装到我的查询中。任何帮助,将不胜感激!
SELECT number, ((DATEDIFF (scheduled_start_date,gate_3_start_date) - DATEDIFF (scheduled_due_date,gate_4_delivery_date))*100 / (DATEDIFF (scheduled_due_date,gate_4_delivery_date))) as 'Percent' FROM dashboard