Share via


How to: Insert Columns into Tables

Use Table Designer to add new columns to a table. When you open a table in Table Designer, you see all of its currently defined columns as well as a blank row at the bottom of the table definition grid. You can add columns either in the blank row or you can insert them between existing rows.

Note

Your computer might show different names or locations for some of the Visual Studio user interface elements in the following instructions. The Visual Studio edition that you have and the settings that you use determine these elements. For more information, see Visual Studio Settings.

To insert columns into a table with Table Designer

  1. In Server Explorer, right-click the table into which you want to add columns and choose Open Table Definition.

    The table opens in Table Designer.

  2. Right-click a row in the table and select Insert Column from the shortcut menu. A blank column row is inserted.

    -or-

    Place the cursor in the first blank cell in the Column Name column.

  3. In the Column Name column, type the column name in the cell. The column name is a required value.

  4. Press the TAB key to go to the Data Type cell and select a data type from the dropdown. This too is a required value, and will be assigned the default value if you don't choose one.

    Note

    You can change the default value in the Options dialog box under Database Tools.

  5. Continue to define any other column properties in the Column Properties tab.

    Note

    The default values for your column properties are added when you create a new column, but you can change them in the Column Properties tab.

See Also

Other Resources

Working with Columns

Working with Tables in Table Designer