| title | CHANGE_TRACKING_CURRENT_VERSION (Transact-SQL) | Microsoft Docs | ||
|---|---|---|---|
| ms.custom | |||
| ms.date | 08/08/2016 | ||
| ms.prod | sql-non-specified | ||
| ms.reviewer | |||
| ms.suite | |||
| ms.technology |
|
||
| ms.tgt_pltfrm | |||
| ms.topic | language-reference | ||
| f1_keywords |
|
||
| dev_langs |
|
||
| helpviewer_keywords |
|
||
| ms.assetid | 3027c4f7-6b4d-4089-a369-5926e8a8da1c | ||
| caps.latest.revision | 16 | ||
| author | BYHAM | ||
| ms.author | rickbyh | ||
| manager | jhubbard |
[!INCLUDEtsql-appliesto-ss2008-asdb-xxxx-xxx_md]
Returns a version that is associated with the last committed transaction. This version can be used when you enumerate changes by using CHANGETABLE.
Transact-SQL Syntax Conventions
CHANGE_TRACKING_CURRENT_VERSION ( )
bigint
Returns NULL when change tracking is not enabled for the database.
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(); Change Tracking Functions (Transact-SQL)
CHANGETABLE (Transact-SQL)
CHANGE_TRACKING_MIN_VALID_VERSION (Transact-SQL)
Track Data Changes (SQL Server)