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

what is database replication? : Sql server database administration

1129


What are the export options of ssrs?

178


Does partitioning improve performance sql server?

1029


How to assign null values to variables or columns?

1027


Explain the various types of concurrency problem?

1241


What are user defined functions in ms sql server?

1064


Explain about sql server login?

1137


How to use subqueries with the in operators in ms sql server?

1125


How global temporary tables are represented and its scope?

1015


What are scheduled tasks in sql server?

1141


Explain the microsoft sql server delete command?

1079


your distribution database is full what will u do

2218


How to create percentile function?

159


How to round a numeric value to a specific precision?

1126


What is the need for group functions in sql?

1153