SQL Guide : solidDB® SQL statements : ALTER TABLE : ALTER TABLE ... SET HISTORY COLUMNS
  
ALTER TABLE ... SET HISTORY COLUMNS
ALTER TABLE table_name SET HISTORY COLUMNS ( col1, col2, colN ...)
Usage
To further optimize the synchronization history process, after you set tables for synchronization history, you can use the SET HISTORY COLUMNS statement to specify which column updates in the master and its corresponding synchronized table cause entries to the history table. If you do not use this statement to specify particular columns, then all update operations (on all columns) in the master database cause a new entry to the history table when the corresponding synchronized table is updated. Generally, we recommend using ALTER TABLE ... SET HISTORY COLUMNS for columns that are used for search criteria or for joining.
Usage in master
Use SET SYNCHISTORY and SET HISTORY COLUMNS in the master to enable incremental publications on a table.
Usage in replica
Use SET SYNCHISTORY and SET HISTORY COLUMNS in the replica to enable incremental REFRESH on a table.
Note In order for ALTER TABLE ... SET HISTORY COLUMNS to succeed, the statement ALTER TABLE ... SET SYNCHISTORY has to be executed first. Executing ALTER TABLE ... SET NOSYNCHISTORY removes also the effect of ALTER TABLE ... SET HISTORY COLUMNS.
Examples
ALTER TABLE myLargeTable SET HISTORY COLUMNS (accountid);
Return values
Error code
Description
13047
No privilege for operation
13100
Illegal table mode combination
13134
Table is not a base table
25038
Table is referenced in publication publication_name; drop or alter operations are not allowed
25039
Table is referenced in subscription to publication publication_name; drop or alter operations are not allowed.
Related reference
ALTER TABLE ... SET SYNCHISTORY
See also
ALTER TABLE