I have two dates , I want to display all records in those two dates including those dates.
How can i write query in PostgreSQL,
I have found
SELECT *
FROM mytable
WHERE (start_date, end_date) OVERLAPS ('2012-01-01'::DATE, '2012-04-12'::DATE);
Here both days excluded
also
SELECT *
FROM tbl
WHERE start_date <= '2012-04-12'::date
AND end_date >= '2012-01-01'::date;
here start_date excluded.