Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
InsertColumn Method

InsertColumn Method

This feature will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature.

The InsertColumn method adds a column to the Columns collection of a Table object at the position indicated.


object
.InsertColumn(
Column
,
InsertBeforeColumn
)

object

Expression that evaluates to an object in the Applies To list.

Column

Expression that evaluates to a Column object.

InsertBeforeColumn

String that names an existing Column object in the Columns collection of a Table object.

HRESULT InsertColumn(
LPSQLDMOCOLUMN pNewColumn,
SQLDMO_LPCSTR szBeforeColumn);

Use the InsertColumn method when the ordinal position of a column must be maintained.

ms136870.note(en-US,SQL.90).gifNote:
Columns in existing Microsoft SQL Server tables have fixed ordinal location. You cannot use the InsertColumn method when the Table object references an existing SQL Server table. Use InsertColumn only when the Table object is used to create a SQL Server table.

Community Additions

ADD
Show:
© 2015 Microsoft