sql server - How to retrieve next 5 hours data from the table in sql -


select * tablename         text_date < getdate()      ,         text_date < dateadd(minute, 300, getdate()) 

is there wrong in this?

try 1 -

declare @data datetime select @data = getdate()  select * tablename text_date between @data , dateadd(minute, 300, @data) 

Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

html - Unable to style the color of bullets in a list -

c# - must be a non-abstract type with a public parameterless constructor in redis -