GeekInterview.com
Series: Subject: Topic:
Question: 11 of 58

Fetch Data

How will you fetch the records of last week and last month?
Asked by: avanibhatt2006 | Member Since Feb-2009 | Asked on: Feb 10th, 2009

View all questions by avanibhatt2006   View all answers by avanibhatt2006

Showing Answers 1 - 2 of 2 Answers
hamsa_mohan

Answered On : Feb 18th, 2009

View all answers by hamsa_mohan

select * from table1 where date_a  > date_sub(current_date,inteval 7 day);

Yes  1 User has rated as useful.
  
Login to rate this answer.

select * from state where stateTime  > date_sub(curdate(),interval 7 day);

Yes  1 User has rated as useful.
  
Login to rate this answer.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Related Open Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.