BEGIN TRANSACTION DECLARE @currentVersion bigint = (SELECT TOP 1 LastVersion FROM VersionTracking WHERE TableName=\'Test1\') DECLARE @newVersion bigint = CHANGE_TR