如果希望在 SQL 中使用 IF 表达式,可以使用下面的语句。
IF(v.date_visa_issued IS NULL,
DATEDIFF(NOW(), v.date_visa_interview),
DATEDIFF(v.date_visa_issued,
v.date_visa_interview)) AS days,
如果希望在 SQL 中使用 IF 表达式,可以使用下面的语句。
IF(v.date_visa_issued IS NULL,
DATEDIFF(NOW(), v.date_visa_interview),
DATEDIFF(v.date_visa_issued,
v.date_visa_interview)) AS days,