我有这个查询:
SELECT
id,
nullif(((ad != 3 and ad !=9 and ad !=2) +
(rg != 3 and rg !=9 and rg !=2) +
(sr != 3 and sr !=9 and sr !=2) +
(cm != 3 and cm !=9 and cm !=2) +
(ba != 3 and ba !=9 and ba !=2) +
(jt != 3 and jt !=9 and jt !=2) +
(sg != 3 and sg !=9 and sg !=2)),0) as dia
FROM
asistencia
where
id > 181 and id < 213
如果值是0,我已经添加了null,但是假设表的行ID以200结尾
因此,结果查询仅显示值行,直到行ID200。我想显示从181到213的完整行,将空值添加到行ID 200之后的行 有可能吗?
这是因为我想在Highcharts图表中显示整天。