I have a table with date column in it. I need to fetch the records from it based on
the given date.
Currently when i used the query:
select * from workingemployee_data where created_date like '20-Jan-2012'
This gives all records between today and 10 days ago:
SELECT * FROM workingemployee WHERE created_date BETWEEN sysdate - INTERVAL '10' DAY AND sysdate
This gives all records entered exactly 10 days ago:
SELECT * FROM workingemployee WHERE created_date = sysdate - INTERVAL '10' DAY
sysdate with exact date if you want.