How will u get 5 years back record?

Answer Posted / tp

select * from table1 where date between dateadd(yy,-
5,getdate()) and getdate()

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is sql injection and why is it a problem? : sql server security

563


Explain about Normalization?

563


What is the difference between ROW_NUMBER and Ranking function in SQL SERVER?

602


Why SQL Agent is used?

594


What is the difference between Triggers and Stored Procedure?

566






How to update muliple row in single query?

605


What do you mean by 'normalization'?

602


How to get a list of columns using the "sp_help" stored procedure in ms sql server?

582


What is the full meaning of dml?

520


What are synonyms?

523


what is create database syntax? : Sql server database administration

602


What is default constraint?

537


What are the purpose of Normalisation?

636


What is sql server profiler trace data file?

581


How can we use ConnectorJ JDBC Driver with MS SQL?

564