I want to delete records from a db table based on a time-stamp for each record. I would like to have it automatically delete records compared to a date/time interval without
Create a sql JOB with below query:
UPDATE [dbo].[User] WITH (ROWLOCK) SET active_flag=0 where lastlogindt < DATEADD(Day,-90,GETDATE())