I have a smalldatetime field named myTime recording when the record was created. I need the syntax that selects records created within the last hour.>
smalldatetime
myTime
Use this:
SELECT * FROM Whatever WHERE myTime > DATEADD(HOUR, -1, GETDATE())