Skip to content

Latest commit

 

History

History
63 lines (51 loc) · 2.41 KB

File metadata and controls

63 lines (51 loc) · 2.41 KB

title: "WITH CHANGE_TRACKING_CONTEXT (Transact-SQL) | Microsoft Docs" ms.custom: "" ms.date: "08/08/2016" ms.prod: "sql" ms.prod_service: "database-engine, sql-database" ms.service: "" ms.component: "system-functions" ms.reviewer: "" ms.suite: "sql" ms.technology:

  • "database-engine" ms.tgt_pltfrm: "" ms.topic: "language-reference" f1_keywords:
  • "WITH_CHANGE_TRACKING_CONTEXT_TSQL"
  • "WITH CHANGE_TRACKING_CONTEXT" dev_langs:
  • "TSQL" helpviewer_keywords:
  • "WITH CHANGE_TRACKING_CONTEXT"
  • "change tracking [SQL Server], WITH CHANGE_TRACKING_CONTEXT" ms.assetid: 885e33a1-602a-4b94-8380-a63ac935a683 caps.latest.revision: 15 author: "rothja" ms.author: "jroth" manager: "craigg" ms.workload: "Inactive" monikerRange: "= azuresqldb-current || >= sql-server-2016 || = sqlallproducts-allversions"

WITH CHANGE_TRACKING_CONTEXT (Transact-SQL)

[!INCLUDEtsql-appliesto-ss2008-asdb-xxxx-xxx-md]

Enables the context of a change to be specified, such as an originator ID, when data is changed. For example, when using change tracking, an application might want to differentiate between changes that were made by the application itself and changes that were made to the data outside the application.

Topic link icon Transact-SQL Syntax Conventions

Syntax

  
WITH CHANGE_TRACKING_CONTEXT ( context )  

Parameters

context
Is the contextual information that is supplied by the calling application and stored with the change tracking information for the change. context is varbinary(128).

The value can be a constant or a variable, but cannot be NULL.

Examples

The following example sets the change tracking context for a data change.

WITH CHANGE_TRACKING_CONTEXT ( context )  

See Also

Change Tracking Functions (Transact-SQL)
CHANGETABLE (Transact-SQL)
Track Data Changes (SQL Server)