Specify Column Names and Datatypes

When you create a replication definition, list the names and datatypes of the columns from the table that you want to copy.

A column’s name and datatype will be the same in the replicate table as in the primary table unless you specify a different replicate (published) column name or datatype.

Enclose the names of all of the columns and their datatypes in parentheses. For multiple columns, separate each column and its datatype from the next column with a comma.

For example, the following command creates a replication definition named publishers_rep1 for source and destination tables named publishers. It includes all the columns and their datatypes.
create replication definition publishers_rep1
with primary at TOKYO_DS.pubs2
with all tables named publishers
(pub_id char(4),
pub_name varchar(40),
city varchar(20),
state char(2))
primary key (pub_id)
The following command creates a replication definition named publishers_rep2 that omits the city column. Destination sites that do not require this column can subscribe to this replication definition.
create replication definition publishers_rep2
with primary at TOKYO_DS.pubs2
with all tables named publishers
(pub_id char(4),
pub_name varchar(40),
state char(2))
primary key (pub_id)

Performance is best if columns are listed in the same order in the replication definition as in the tables themselves.

You can use only native and user defined datatypes supported by Replication Server. If a primary table has columns with user-defined datatypes, you must use a compatible supported datatype in the replication definition. You can also employ user-defined datatypes supplied with Replication Server as part of the installation process.

See Replication Server Reference Manual > Topics > Datatypes for complete details on the datatypes supported by Replication Server.