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 the parse query button used for?

695


What are the default system databases in sql server 2000?

610


Differentiate between mongodb vs. Sql server?

675


Why we use the openxml clause?

629


What is the difference between a view and a stored procedure?

655






Can a stored procedure call itself or recursive stored procedure? How much level sp nesting is possible?

697


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

581


Explain about integration services of Microsoft SQL server?

679


What is dirty page?

644


What is the index requirement in SQL Azure?

80


When should you use an instead of trigger?

624


What are extended events in sql server?

597


What factors you will consider calculating the storage requirement for that view?

625


Difference between report and query parameter. Why do we need different type of parameter?

661


How many clustered indexes there can be on table ?

682