The Columns collection contains Column objects exposing the columns of a Microsoft® SQL Server™ table.
With the Columns collection, you can:
Columns in SQL Server tables are defined as part of a CREATE TABLE or ALTER TABLE statement.
When creating a SQL Server table using the Table object, an empty Columns collection is created as part of the Table object creation. Adding Column objects to the Columns collection adds column definition text to the CREATE TABLE statement generated when the Table object is added to the Tables collection of a Database object.
If a Table object references an existing SQL Server table, changes to the Columns collection generate ALTER TABLE statements.
For more information about creating columns, see Column Object.
To remove a column from a SQL Server table
oTables("Employees").Columns.Remove("Photo")
Note Dropping a column from a SQL Server table is bound by dependencies on the column, and can fail.
Add Method | Refresh Method |
ItemByID Method | Remove Method (Collections) |