我正在尝试使用if then then语句但没有成功,这里是我的代码
SELECT * FROM mahasiswa
IF (id_jns_daftar = 2) THEN
INNER JOIN kuliahmhs on mahasiswa.id_reg_pd = kuliahmhs.id_reg_pd
WHERE NULLIF(sks_diakui, '') IS NULL
OR NULLIF(sks_diakui, ' ') IS NULL
OR NULLIF(sks_diakui, ' ') IS NULL
OR NULLIF(sks_diakui, '-') IS NULL
OR NULLIF(sks_diakui, '--') IS NULL
OR NULLIF(sks_diakui, '---') IS NULL
OR NULLIF(sks_diakui, 0) IS NULL
OR NULLIF(sks_diakui, '0') IS NULL
OR sks_diakui != sks_total
关键是,如果id_jns_daftar = 2,则检查其他为NULL的列并仅显示结果id_jns_daftar = 2