GenerateCreationSQL Method

SQLServer.Database.Table.Index Object

Description

Generates a series of Transact-SQL statements (script) that can be used to create this index on another table.

Visual Basic

Index.GenerateCreationSQL ( [TargetTable :=] idTargetTable )

C++

HRESULT pIndex->GenerateCreationSQL (
LPSQLOLETABLE
idTargetTable,
SQLOLE_LPBSTR
pstrScript );

Elements

Element Type Description

strScript String Generated Transact-SQL backup script
idTargetTable Identifier Table that the script will create the index on

Remarks

To schedule this index creation script, set the Task.Command property to the string returned by this method.