IF Exists(Select id From 表 Where Datediff(day,日期字段,GETDATE())>0) Select * From 表 Where Datediff(day,日期字段,GETDATE())>0Else Select * From 表 Where Datediff(day,日期字段,GETDATE())<=0