Chapter 18. Command Referencefor Adaptive Server Enterprise
sp_add_article procedure
Purpose Toadd an article to a publication.
Syntax sp_add_articlepublication_name,
table_name,
where_expr,
subscribe_by_expr,
subscribe_by_view
Argument Description
publication_name
Thename of the publication to which the article is to
beadded.
table_name
Thetable containing the article.
where_expr
This optional argument must be a column name or
NULL.The publication includes only rows for which
thesupplied column value is not NULL.
Thedefault value is NULL, in which case no rows are
excludedfrom the publication.
subscribe_by_expr
The new subscription expression defining which
rows are to be included in the publication for each
subscription.
The expression must be the name of a column in
table_name
. The default valueis NULL.
subscribe_by_view
Aview defining the columns and rows to be included
inthe publication.
Formore information, see “Tuning extraction perfor-
mance” on page 155 and “Tuningextraction perfor-
mancefor shared rows” on page 162.
Seealso “sp_add_remote_tableprocedure” on page 384
“sp_create_publicationprocedure” on page 386
“sp_remove_articleprocedure” on page 428
“CREATEPUBLICATION statement” [ASA SQL Reference,page 385]
Description Running sp_add_article adds an article to a publication. The table must be
markedfor replication using sp_add_remote_table before it can be added
toa publication; failure to do so leads to an error.
Callingsp_add_article adds all the columns of the table to a publication. If
381