COALESCE('字段','字段或值')
示例:
select
coalesce(t.tap_num, 0) - coalesce( s.ins_num, 0)
from
d_task t,
d_task_schedule s
where
t.id = s.tid
and t.tenant_app_id = 1
and t.task_status < 20
COALESCE('字段','字段或值')
示例:
select
coalesce(t.tap_num, 0) - coalesce( s.ins_num, 0)
from
d_task t,
d_task_schedule s
where
t.id = s.tid
and t.tenant_app_id = 1
and t.task_status < 20