0
目前所有行中的status
列爲0,而startdate
至少在now()
之前幾天,但以下查詢返回空結果集。mysql psuedo column in where cluse
select p.id, (select @days:=(datediff(now(),p.startdate))) as days from poa p
where p.status < @days;
哪裏可能會出錯?