--- title: "Modify SQL Server table columns" slug: "modify-sql-server-table-columns" description: "Change the columns of an existing SQL Server table from inside Excel, including renaming a column and changing its properties." updated: 2025-11-26T15:14:52Z published: 2025-11-26T15:14:52Z canonical: "sqlspreads.com/modify-sql-server-table-columns" --- > ## Documentation Index > Fetch the complete documentation index at: https://sqlspreads.com/docs/llms.txt > Use this file to discover all available pages before exploring further. # Modify SQL Server table columns This feature allows you to modify the columns in an existing SQL Server table. The actions that can be performed are: - Change the properties of an existing column: - Change column name - Change column data type - Set column as Primary Key - Set column to allow null - Set a default value for the column - Set the column as an identity column - Add a new column to a table - Delete an existing column from a table - Rename a table To access this feature, click on the **Modify SQL Server table columns** button in the SQL Server Tools menu. ![SQLServerTools_RibbonMenuButton2.png](https://cdn.document360.io/ad9d65b3-9cdd-4b28-8cb8-86cb149873bc/Images/Documentation/SQLServerTools_RibbonMenuButton2.png) The **Modify existing SQL Server table** dialog is shown below: ![SQL Spreads 7.8.2 Modify existing SQL table from Excel](https://cdn.document360.io/ad9d65b3-9cdd-4b28-8cb8-86cb149873bc/Images/Documentation/SQL%20Spreads%207.8.2%20Modify%20SQL%20Server%20columns%20in%20Excel.png) ### Change the properties of columns From the left pane of the **Modify existing SQL Server table** dialog, select the table that contains the columns that you want to modify. Note that you can also change to a different server by clicking the **Edit** button to the right of the SQL Server name. ![SQLServerTools_SelectTable.png](https://cdn.document360.io/ad9d65b3-9cdd-4b28-8cb8-86cb149873bc/Images/Documentation/SQLServerTools_SelectTable.png) In the right-hand pane, the columns for the selected table are displayed. You can now modify one or more of the columns as needed. To **change the column name**, simply click in the Name cell of of the column you want to change and type the new name. ![SQLServerTools_ChangeColumnName.png](https://cdn.document360.io/ad9d65b3-9cdd-4b28-8cb8-86cb149873bc/Images/Documentation/SQLServerTools_ChangeColumnName.png) To **change the Type**, click the **Type** drop down list and select another data type: ![SQLServerTools_ColumnDataTypes.png](https://cdn.document360.io/ad9d65b3-9cdd-4b28-8cb8-86cb149873bc/Images/Documentation/SQLServerTools_ColumnDataTypes.png) For the following data types you can also specify the exact size of the column in the database: - **Varchar and NVarchar**: Can be set to the max number of characters or MAX to auto-adjust the size based on the content in the column. - **Decimal and Numeric**: The length must be entered as '(7,3)' where the first number is the total number of figures and the last number is the number of figures after the decimal separator. You can set a specific column to be the Primary Key by checking the **Primary Key** box. ![SQLServerTools_ColumnPrimaryKey.png](https://cdn.document360.io/ad9d65b3-9cdd-4b28-8cb8-86cb149873bc/Images/Documentation/SQLServerTools_ColumnPrimaryKey.png) If your columns should allow nulls, then check the **Allow null** box for each required column. ![SQLServerTools_ColumnAllowNulls.png](https://cdn.document360.io/ad9d65b3-9cdd-4b28-8cb8-86cb149873bc/Images/Documentation/SQLServerTools_ColumnAllowNulls.png) You can set a default value for a column to use when the user does not enter any value when inserting new rows. To **set a default value**, select the column and then check the **Default value** option and enter a value. ![SQLServerTools_ColumnDefaultValue.png](https://cdn.document360.io/ad9d65b3-9cdd-4b28-8cb8-86cb149873bc/Images/Documentation/SQLServerTools_ColumnDefaultValue.png) You can set one of your columns to be an auto-incrementing **identity column**. Select the column that you want to be the identity column and then check the **Identity** checkbox. ![SQLServerTools_IdentityColumn.png](https://cdn.document360.io/ad9d65b3-9cdd-4b28-8cb8-86cb149873bc/Images/Documentation/SQLServerTools_IdentityColumn.png) ### Add a new column to a table To add a new column to a table, simply click the **Add column** button and then enter a name and specify the data type and (optionally) other properties like whether to allow nulls and a default value. ![SQLServerTools_AddColumn.png](https://cdn.document360.io/ad9d65b3-9cdd-4b28-8cb8-86cb149873bc/Images/Documentation/SQLServerTools_AddColumn%282%29.png) When you click **OK**, the column is added to the SQL Server table and the table in Excel is refreshed to show the new column. ![SQLServerTools_AddColumn_Exceltable.png](https://cdn.document360.io/ad9d65b3-9cdd-4b28-8cb8-86cb149873bc/Images/Documentation/SQLServerTools_AddColumn_Exceltable.png) ### Delete a column from a table To delete a column from a table, simply select the column that you want to delete and click on the **Delete column** button. ![SQLServerTools_DeleteColumn.png](https://cdn.document360.io/ad9d65b3-9cdd-4b28-8cb8-86cb149873bc/Images/Documentation/SQLServerTools_DeleteColumn.png) The column will be deleted from the SQL Server table and the table in Excel is refreshed to remove the column also. ### Rename a table You can re-name your SQL Server table by clicking on the **Rename table** button and then entering the new table name in the Rename Table dialog. ![SQL Spreads 7.8.2 Rename existing SQL Server table](https://cdn.document360.io/ad9d65b3-9cdd-4b28-8cb8-86cb149873bc/Images/Documentation/SQL%20Spreads%207.8.2%20Rename%20table%20in%20existing%20SQL%20Server%20table.png) When you click OK, the SQL Server table will be re-named. If you have the renamed table selected in the SQL Spreads Designer, SQL Spreads will then prompt you to select the re-named table. Select the new table name and click **OK** ![SQLServerTools_TableMissingDialog.png](https://cdn.document360.io/ad9d65b3-9cdd-4b28-8cb8-86cb149873bc/Images/Documentation/SQLServerTools_TableMissingDialog.png) ### Make Temporal Table This option **Make Temporal Table** lets you convert an existing table into a temporal table directly from SQL Spreads. Once enabled, SQL Server will automatically track all changes to the table’s data, storing previous versions in a system-maintained history table. This makes it easy to audit changes, view past data, or restore previous values without manually setting up history tracking in SQL Server. ![SQL Spreads 7.8.2 Make existing SQL Server table into Temporal Table](https://cdn.document360.io/ad9d65b3-9cdd-4b28-8cb8-86cb149873bc/Images/Documentation/SQL%20Spreads%207.8.2%20Make%20existing%20SQL%20Server%20table%20into%20Temporal%20Table.png)