Aktualizacja czas wydarzenia o okres 5 min
update events_time
set
ev_time_end = ev_time_start + '5 minute' :: interval
where
ev_id = 5
Aktualizacja czas wydarzenia o okres 5 min
update events_time
set
ev_time_end = ev_time_start + '5 minute' :: interval
where
ev_id = 5
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"
SELECT t_add_date,
SUBSTRING(t_add_date :: CHARACTER varying, 1, 19)
FROM TABLE
WHERE t_add_date & lt;
NOW() - '1 DAY' :: interval t_add_date SUBSTRING
2010-03-10 21:26:49.928445 2010-03-10 21:26:49
2010-03-10 21:26:49.928445 2010-03-10 21:26:49
select * from table where t_add_date < NOW()-'5 MONTH'::interval
select * from table where t_add_date < NOW()+'5 MONTH'::interval
select * from table where t_add_date < NOW()-'1 DAY'::interval
select * from table where t_add_date < NOW()-'2 DAYS'::interval
select * from table where t_add_date < NOW()-'1 DAY'::interval
select * from table where t_add_date < NOW()-'5 MINUTES'::interval
select * from table where t_add_date < NOW()-'3 HOURS'::interval