23 kwi 2010

Zapytanie o rekordy z dnia bieżącego + jeden dzień

select NOW()::date "2010-04-23"

select t_date from table where t_date >= NOW()::date+'1 day'::interval order by t_date limit 3

"2010-04-24"
"2010-04-24"
"2010-04-24"

select t_date from table where t_date >= NOW()+'1 day'::interval order by t_date limit 3

"2010-04-25"
"2010-04-25"
"2010-04-25"