Redigera

Dela via


cdc.captured_columns (Transact-SQL)

Applies to: SQL Server Azure SQL Database Azure SQL Managed Instance

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)