Chapter 18. Command Referencefor Adaptive Server Enterprise
sp_add_article_col procedure
Purpose Toadd a column to an article in a publication.
Syntax sp_add_article_colpublication_name,
table_name,
column_name
Argument Description
publication_name
Thename of the publication to which the article is to
beadded.
table_name
Thetable containing the article.
column_name
Thecolumn to be added to the article in a publication
Seealso “sp_add_articleprocedure” on page 381
“sp_remove_articleprocedure” on page 428
“ALTERPUBLICATIONstatement” [ASA SQL Reference, page 280]
Description Running sp_add_article_col adds a column to an article in a publication.
Thetable must first be added to the publication using the “sp_add_article
procedure”on page 381.
Toadd all the columns of a table to a publication you do not need to use
sp_add_article_col;just call sp_add_article.
Toadd 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
youwish to include in the publication.
Aswith other data definition changes, in a production environment this
procedureshould only be run on a quiet SQL Remote installation.
Formore information on the requirements for a quiet system, see
“Makingschema changes” on page 275.
Example Thefollowing statements add the emp_id and emp_lname columns of the
employeetable 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
383