CHANGE_TRACKING_CURRENT_VERSION (Transact-SQL)
Applies to: SQL Server Azure SQL Database Azure SQL Managed Instance
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
Syntax
CHANGE_TRACKING_CURRENT_VERSION ( )
Return Type
bigint
Remarks
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();
See Also
Change Tracking Functions (Transact-SQL)
CHANGETABLE (Transact-SQL)
CHANGE_TRACKING_MIN_VALID_VERSION (Transact-SQL)
Track Data Changes (SQL Server)
Phản hồi
https://aka.ms/ContentUserFeedback.
Sắp ra mắt: Trong năm 2024, chúng tôi sẽ dần gỡ bỏ Sự cố với GitHub dưới dạng cơ chế phản hồi cho nội dung và thay thế bằng hệ thống phản hồi mới. Để biết thêm thông tin, hãy xem:Gửi và xem ý kiến phản hồi dành cho