Share via


cdc.captured_columns (Transact-SQL)

Returns one row for each column tracked in a capture 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 source 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 (1-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.