SQL Remote User's Guide
Command Reference for Adaptive Server Enterprise
To add a column to an article in a publication.
sp_add_article_col publication_name,
table_name,
column_name
Argument | Description |
---|---|
publication_name | The name of the publication to which the article is to be added. |
table_name | The table containing the article. |
column_name | The column to be added to the article in a publication |
Running sp_add_article_col adds a column to an article in a publication. The table must first be added to the publication using the sp_add_article procedure.
To add all the columns of a table to a publication you do not need to use sp_add_article_col; just call sp_add_article.
To add only some of the columns of a table to a publication you first call sp_add_article, and then call sp_add_article_col for each of the columns you wish to include in the publication.
As with other data definition changes, in a production environment this procedure should only be run on a quiet SQL Remote installation.
For more information on the requirements for a quiet system, see Making schema changes.
The following statements add the emp_id and emp_lname columns of the employee table to a publication named Personnel:
sp_add_article 'Personnel', employee' sp_add_article_col 'Personnel', 'employee', 'emp_id' sp_add_article_col 'Personnel', 'employee', 'emp_lname' go