DECLARE @StartDate datetime
DECLARE @EndDate datetime
SET @StartDate = DateADD(mi, -5, Current_TimeStamp)
SET @EndDate = DateADD(mi, -0, Current_TimeStamp)
Select @StartDate,@EndDate
Select * from TableName With (NOLOCK)
Where LastModified between @StartDate and @EndDate
OR
Select * from TableName With (NOLOCK)
Where LastModified >=@StartDate and LastModified <=@EndDate
DECLARE @EndDate datetime
SET @StartDate = DateADD(mi, -5, Current_TimeStamp)
SET @EndDate = DateADD(mi, -0, Current_TimeStamp)
Select @StartDate,@EndDate
Select * from TableName With (NOLOCK)
Where LastModified between @StartDate and @EndDate
OR
Select * from TableName With (NOLOCK)
Where LastModified >=@StartDate and LastModified <=@EndDate