Hello people I have two fields in table startdate and enddate , i want to fetch records between this two date including this dates. Can anyone give me query for this?
SELECT columns FROM my_table WHERE date_column >= 'INSERT_START_DATE' AND date_column <= 'INSERT_END_DATE';
SELECT columns FROM my_table WHERE date_column BETWEEN 'START_DATE' AND 'END_DATE'; is simpler. (Regardless of which you use, if you don't include the time, END_DATE should be one day past the last date you want, because a date with no time is one second past midnight minus one second on that date [IOW, just after midnight, but not yet one second past].)