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 YourTable WHERE YourDateTime >= DATEADD(hh, -1, GETDATE())