Skip to content

Latest commit

 

History

History
33 lines (26 loc) · 2.26 KB

File metadata and controls

33 lines (26 loc) · 2.26 KB
title Drop SQL Server index (Native Client OLE DB provider)
description Drop SQL Server index (Native Client OLE DB provider)
author markingmyname
ms.author maghan
ms.date 03/14/2017
ms.service sql
ms.subservice native-client
ms.topic reference
helpviewer_keywords
removing indexes
deleting indexes
DropIndex function
dropping indexes
SQL Server Native Client OLE DB provider, indexes
indexes [OLE DB]

Dropping a SQL Server Native Client Index

The [!INCLUDEssNoVersion] Native Client OLE DB provider exposes the IIndexDefinition::DropIndex function. This allows consumers to remove an index from a [!INCLUDEssNoVersion] table.

The [!INCLUDEssNoVersion] Native Client OLE DB provider exposes some [!INCLUDEssNoVersion] PRIMARY KEY and UNIQUE constraints as indexes. The table owner, database owner, and some administrative role members can modify a [!INCLUDEssNoVersion] table, dropping a constraint. By default, only the table owner can drop an existing index. Therefore, DropIndex success or failure depends not only on the application user's access rights but also on the type of index indicated.

Consumers specify the table name as a Unicode character string in the pwszName member of the uName union in the pTableID parameter. The eKind member of pTableID must be DBKIND_NAME.

Consumers specify the index name as a Unicode character string in the pwszName member of the uName union in the pIndexID parameter. The eKind member of pIndexID must be DBKIND_NAME. The [!INCLUDEssNoVersion] Native Client OLE DB provider does not support the OLE DB feature of dropping all indexes on a table when pIndexID is null. If pIndexID is null, E_INVALIDARG is returned.

See Also

Tables and Indexes
ALTER TABLE (Transact-SQL)
DROP INDEX (Transact-SQL)