Using the WITH REPLCHECK Keywords
Use the WITH REPLCHECK keywords to create the ifx_replcheck shadow column that Enterprise Replication uses for consistency checking.
The ifx_replcheck column is a visible shadow column because it can be indexed and can be viewed in system catalog tables. After you create the ifx_replcheck shadow column, you must create a new unique index on the primary key and the ifx_replcheck column. The ifx_replcheck shadow column must be the last column in the index. Enterprise Replication uses that index to speed consistency checking.
For
most database operations, the ifx_replcheck column is hidden.
For example, if you include the WITH REPLCHECK keywords when you create
a table, the ifx_replcheck column has the following behavior:
- It is not returned by queries that specify an asterisk ( * ) as
the projection list, as in the statement:
SELECT * FROM tablename;
- It does appear in DB-Access when you ask for information about the columns of the table.
- It is included in the number of columns (ncols) in the systables system catalog table entry for tablename.
To view the contents of the ifx_replcheck column,
you must explicitly specify the columns in the projection list of
a SELECT statement, as the following example shows:
SELECT ifx_replcheck FROM customer;
Example
In the following example, the ifx_replcheck shadow column is added to the customer table:
CREATE TABLE customer (id int) WITH REPLCHECK;