I need a query for this.
In a table, I have two date columns like fromdate and todate. My date format will be yyyy-mm-dd.
I need to know how to compare dates including the given date to take all dates between the given dates
For example,fromdate is 215-08-01 and todate is 2015-08-31
I wrote my query like,
SELECT * FROM tbl_name WHERE fromdate >='215-08-01' AND todate <='2015-08-31'
Is it correct? or Where it is wrong?