Skip to content

TSEQUAL

EXEC sp_cycle_errorlog;
GO
EXEC xp_readerrorlog 0, 1, 'Backup', 'succeeded';
GO
SELECT * FROM sys.syslogins WHERE name = 'sa';
IF TSEQUAL(@@DBTS, @@DBTS) PRINT 'True'
ELSE PRINT 'False';
True

The TSEQUAL function is used to compare two timestamp values. In this example, the timestamps of the database (represented as @@DBTS) are compared to themselves. Since the compared timestamps are the same, the output is ‘True’.