SQLServer.Database.Table.Index Object
Generates a series of Transact-SQL statements (script) that can be used to create this index on another table.
Index.GenerateCreationSQL ( [TargetTable :=] idTargetTable )
HRESULT pIndex->GenerateCreationSQL (
LPSQLOLETABLE idTargetTable,
SQLOLE_LPBSTR pstrScript );
Element | Type | Description |
---|
strScript | String | Generated Transact-SQL backup script |
idTargetTable | Identifier | Table that the script will create the index on |
To schedule this index creation script, set the Task.Command property to the string returned by this method.