WHERE datediff( d,getdate(),my_date) > 0 -- 取得my_date是今天以後的資料WHERE datediff( d,my_date,getdate()) = 1 -- 取得my_date是昨天的資料