Share Blog

Friday, July 06, 2018

How to find the days a login password was last changed in SQL Server


How to find the days a login password was last changed in SQL Server?

declare @days int
SELECT @days=DATEDIFF(day, Max(entrydate),GETDATE()) from users where id='1'
select @days as days

No comments:

Post a Comment