Udostępnij za pośrednictwem


CHANGE_TRACKING_CURRENT_VERSION (Transact-SQL)

Returns a version that is associated with the last committed transaction. This version can be used when you enumerate changes by using CHANGETABLE.

Ikona łącza do tematu Transact-SQL Syntax Conventions

Składnia

CHANGE_TRACKING_CURRENT_VERSION ( )

Return Type

bigint

Uwagi

Returns NULL when change tracking is not enabled for the database.

Examples

The following example declares the local variable @next\_baseline for storing the current version of tracked changes, and then uses the CHANGE_TRACKING_CURRENT_VERSION() function to obtain the value for the variable.

DECLARE @next_baseline bigint;
SET @next_baseline = CHANGE_TRACKING_CURRENT_VERSION();

Zobacz także

Odwołanie

CHANGETABLE (Transact-SQL)

CHANGE_TRACKING_MIN_VALID_VERSION (Transact-SQL)

Koncepcje

Change Tracking Functions (Transact-SQL)

Track Data Changes (SQL Server)