Share via


HasPrimaryKey Property

Microsoft SQL Server의 이후 버전에서는 이 기능이 제거됩니다. 새 개발 작업에서는 이 기능을 사용하지 말고, 현재 이 기능을 사용하는 응용 프로그램은 수정하십시오.

The HasPrimaryKey property returns TRUE if the referenced table has a PRIMARY KEY constraint defined on a column.

구문

object
.HasPrimaryKey

Parts

  • object
    An expression that evaluates to an object in the Applies To list

Data Type

Boolean

Modifiable

Read-only

Prototype (C/C++)

HRESULT GetHasPrimaryKey(LPBOOL pRetVal);

주의

Transactional replication requires a primary key to identify rows. For an instance of Microsoft SQL Server, primary keys are implemented in PRIMARY KEY and UNIQUE key constraints.

If TRUE, the table contains a PRIMARY KEY constraint and can be published as an article in a transactional publication.

If FALSE, the table does not contain support for transactional replication and cannot be published as a transactional article.

Applies To:

ReplicationTable Object