Skip to content

Latest commit

 

History

History
37 lines (31 loc) · 1.93 KB

cdc-captured-columns-transact-sql.md

File metadata and controls

37 lines (31 loc) · 1.93 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic f1_keywords helpviewer_keywords dev_langs
cdc.captured_columns (Transact-SQL)
cdc.captured_columns (Transact-SQL)
VanMSFT
vanto
02/22/2023
sql
system-objects
reference
cdc.captured_columns
cdc.captured_columns_TSQL
cdc.captured_columns
TSQL

cdc.captured_columns (Transact-SQL)

[!INCLUDE SQL Server]

Returns one row for each column tracked in a captured instance. By default, all columns of the source table are captured. However, columns can be included or excluded when the source table is enabled for change data capture by specifying a column list. For more information, see sys.sp_cdc_enable_table (Transact-SQL).

We recommend that you do not query the system tables directly. Instead, execute the sys.sp_cdc_get_source_columns stored procedure.

Column name Data type Description
object_id int ID of the change table to which the captured column belongs.
column_name sysname Name of the captured column.
column_id int ID of the captured column within the source table.
column_type sysname Type of the captured column.
column_ordinal int Column ordinal (one-based) in the change table. The metadata columns in the change table are excluded. Ordinal 1 is assigned to the first captured column.
is_computed bit Indicates that the captured column is a computed column in the source table.

See Also

cdc.change_tables (Transact-SQL)