Skip to content

Latest commit

 

History

History
85 lines (61 loc) · 3.13 KB

sp-helparticlecolumns-transact-sql.md

File metadata and controls

85 lines (61 loc) · 3.13 KB
title description author ms.author ms.reviewer ms.date ms.service ms.subservice ms.topic f1_keywords helpviewer_keywords dev_langs
sp_helparticlecolumns (Transact-SQL)
sp_helparticlecolumns returns all columns in the underlying table.
markingmyname
maghan
randolphwest
05/14/2024
sql
replication
reference
sp_helparticlecolumns
sp_helparticlecolumns_TSQL
sp_helparticlecolumns
TSQL

sp_helparticlecolumns (Transact-SQL)

[!INCLUDE SQL Server SQL MI]

Returns all columns in the underlying table. This stored procedure is executed at the Publisher on the publication database. For Oracle Publishers, this stored procedure is executed at the Distributor on any database.

:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: Transact-SQL syntax conventions

Syntax

sp_helparticlecolumns
    [ @publication = ] N'publication'
    , [ @article = ] N'article'
    [ , [ @publisher = ] N'publisher' ]
[ ; ]

Arguments

[ @publication = ] N'publication'

The name of the publication that contains the article. @publication is sysname, with no default.

[ @article = ] N'article'

The name of the article that has its columns returned. @article is sysname, with no default.

[ @publisher = ] N'publisher'

Specifies a non-[!INCLUDE ssNoVersion] Publisher. @publisher is sysname, with a default of NULL.

@publisher shouldn't be specified when the requested article is published by a [!INCLUDE ssNoVersion] Publisher.

Return code values

0 (columns that aren't published) or 1 (columns that are published).

Result set

Column name Data type Description
column id int Identifier for the column.
column sysname Name of the column.
published bit Whether column is published:

0 = No
1 = Yes
publisher type sysname Data type of the column at the Publisher.
subscriber type sysname Data type of the column at the Subscriber.

Remarks

sp_helparticlecolumns is used in snapshot and transactional replication.

sp_helparticlecolumns is useful in checking a vertical partition.

Permissions

Only members of the sysadmin fixed server role, the db_owner fixed database role, or the publication access list for the current publication can execute sp_helparticlecolumns.

Related content