Answers for "postgresql interval"

SQL
1

psql datetime grather than

SELECT *
FROM table
WHERE update_date >= '2013-05-03'::date
AND update_date < ('2013-05-03'::date + '1 day'::interval);
Posted by: Guest on June-25-2020
3

postgresql today - 1 year

select now() - INTERVAL '1 YEAR';
Posted by: Guest on September-18-2020
0

setval in postgres

SELECT setval('tbl_tbl_id_seq', max(tbl_id)) FROM tbl;
Posted by: Guest on October-29-2021

Code answers related to "SQL"

Browse Popular Code Answers by Language