3.38 GET_TABLE_COLUMN_COUNT

Valid For

Extract and Replicat

Description

Use the GET_TABLE_COLUMN_COUNT function to retrieve the total number of columns in a table, including the number of key columns.

Syntax

#include "usrdecs.h"
short result_code;
table_def table;
ERCALLBACK (GET_TABLE_COLUMN_COUNT, &table, &result_code);

Buffer

typedef struct
{
short num_columns;
short source_or_target;
/* Version 2 CALLBACK_STRUCT_VERSION */
short num_key_columns;
} table_def;

Input

source_or_target

One of the following indicating whether to return the total number of columns for the source or target table.

EXIT_FN_SOURCE_VAL
EXIT_FN_TARGET_VAL

Output

num_columns

The returned total number of columns in the specified table.

num_key_columns

The returned total number of columns that are being used by Oracle GoldenGate as the key for the specified table.

Return Values

EXIT_FN_RET_INVALID_CONTEXT
EXIT_FN_RET_INVALID_PARAM
EXIT_FN_RET_OK