HasPrimaryKey Property
Diese Funktion wird in zukünftigen Versionen von Microsoft SQL Server nicht mehr bereitgestellt. Verwenden Sie diese Funktion beim Entwickeln neuer Anwendungen nicht, und planen Sie das Ändern von Anwendungen, in denen es zurzeit verwendet wird.
The HasPrimaryKey property returns TRUE if the referenced table has a PRIMARY KEY constraint defined on a column.
Syntax
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);
Hinweise
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.