How will u get 5 years back record?

Answer Posted / krishna mohan thamisetty

select *
from table
where date between GETDATE()-(5*365) and GETDATE()

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What number sorts of privileges are accessible in sql?

593


What are the types of dml?

553


Explain how long are locks retained within the repeatable_read and serializable isolation levels, during a read operation with row-level locking?

655


What is autocommit mode in sql server?

541


What is the difference between deallocate cursor and close cursor?

713






Do you know clustered and non-clustered index?

521


What is mean by dml?

532


what changed between the previous version of sql server and the current version? : Sql server database administration

516


If you are given access to a SQL Server, how do you find if the SQL Instance is a named instance or a default instance?

668


Which data type columns are the best candidates for full-text indexing?

597


What is ms sql server reporting services?

504


What does it mean to normalize a database and why would you do it?

524


Explain features of analysis services?

521


Is the order of columns in the set clause important in ms sql server?

518


What are different types of subquery?

717