Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How will u get 5 years back record?

Answer Posted / muhammadrashidmughal

select *
from table
where date between '01/01/2003' and '12-31-2008'

or

today is 09-08-2008

select *
from table
where year(date)=year(getdate)-5 and month(date)= '08' and
day(date) ='09'

or

select *
from table
where date >='09-08-2003'
and date<='09-08-2008'

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to list all user names in a database?

1038


How to remove duplicate rows from table except one?

987


What is the maximum length of an alert name?

997


What is the difference between sdf and mdf?

1281


What is difference between cte and view?

894


How to grant a permission in ms sql server using "grant execute" statements?

1067


Explain the usage of floor function in sql server.

946


What is normalization? Explain different forms of normalization?

1125


What is meant by Active-Passive and Active-Active clustering setup?

1144


What is multi-statement table-value user-defined function?

979


Explain subquery and state its properties?

1021


What is attribute relationships, why we need it? : sql server analysis services, ssas

942


What is bit data type?

1013


What is meant by referential integrity?

996


What are the underflow and overflow behaviors on float literals?

1099