How to work with the Table Editor
Last modified: May 28, 2025
The Table Editor is a visual tool to create, modify, and manage table structures within a database. You can define columns, data types, constraints, such as primary and foreign keys, unique constraints, indexes, and other table properties without writing SQL manually. You can also view the table data and preview a T-SQL script generated automatically.
Key features of the Table Editor in dbForge Studio:
- Create a table using a visual editor with no SQL code.
- Define default values, constraints, and indexes.
- View detailed statistics about a table performance and data distribution.
- Automatically generate a SQL script according to the user-defined changes.
- Rename column names and specify table properties without opening any additional editors.
- Add or remove a trigger at a row level.
- Configure SQL storage for a table.
Open the Table Editor
To open the Table Editor, do one of the following:
- In Database Explorer, right-click the database and select New Object > Table to create a table.
- In Database Explorer, right-click the Tables node and select New Table to create a table.
- In Database Explorer, right-click the table and select New Table to create a new table or select Open Editor to modify an existing table.
The Table Editor includes the following sections:
- Tabs - Provides access to specific editors, such as Columns, Constraints, Indexes, Statistics, Triggers, Storage, Data, and T-SQL.
- Database Details area - Provides a table name, a schema it belongs to, and a table description.
- Table Editor toolbar - Allows you to refresh the table, apply or script changes.
Database Details area
You can specify the following details:
- Name – Enter the table name.
- Schema – Select the schema from the list to which the table will belong. The default schema is dbo.
- Description – Enter a description for the table.
Note
If you’re editing an existing table, update the table description and select OK to save the changes or Cancel to discard them.
Tabs
Tabs include:
Note
After opening the Table Editor, you can also use the View menu at the top to navigate between tabs.
Columns
On the Columns tab, you can define and manage the structure of a table by configuring its columns:
- Add, modify, or remove columns.
- Specify column properties such as data type, length, default values, constraints (NULL/NOT NULL), and collation.
- Set primary keys, unique constraints, and identity properties.
- Define computed columns, if applicable.
In the Columns grid, right-click the row or anywhere in the grid and select the required shortcut menu option:
- New column to add a new column to the grid. The default name is column1, then column2, etc. Alternatively, scroll the list of columns down to get to the empty line.
- Insert column to insert a column between existing columns. The column is inserted above the one you’ve right-clicked.
- Find column to search for a specific column in the Columns grid.
- Move Up to move columns up. Alternatively, press Ctrl+Up.
- Move Down to move columns down. Alternatively, press Ctrl+Down.
- Remove column to remove the selected column.
In the grid, you can also define the NOT NULL, Identity, and Default properties.
To search for columns
1. Right-click anywhere in the grid and select Find column.
2. In the Search box, enter the search string. The columns that match the search criteria will be filtered in the grid, and the matching text will be highlighted in yellow.
If you enter text with spaces, each subsequent input will highlight new results.
To delete the text in the Search box, select Clear in the Search box.
To remove the Search box from the grid, select next to the Search box.
In the grid, you can do the following:
- Add a column name or rename an existing column.
- Set a column data type.
- Define a NOT NULL value.
- Specify identity values.
- Set a column default.
To specify a column name or rename an existing column
In the Name column, double-click the cell and enter a new name.
To set a column data type
1. In the Data Type column, double-click the cell for the column whose data type you want to set or modify.
2. From the list, select the required data type.
To define a NOT NULL value
In the Not Null column, select the checkbox for the column you want to be NOT NULL.
To specify an identity value
In the Identity column, select the checkbox for the required column.
To set a column default
The default value is used if you perform a SQL INSERT for a row but do not provide a value for the column.
In the Default column, select the cell and enter a default value.
Note
You can set or modify a default value only for applicable data types.
To manage column properties
In the Columns grid, select the column and customize its properties in the Column properties grid.
The available properties are grouped into the following categories:
- Main – Name, Unique, Primary.
- Data Type – Data Type, Length, Precision, Scale.
- Identity – Identity, Seed, Increment, Not for Replication.
- Computed – Computed, Persisted, Expression.
- Miscellaneous – Not Null, Collation (database default), Default, Description.
To apply any changes, on the Table Editor toolbar, select Apply Changes.
Constraints
On the Constraints tab, you can manage primary and foreign keys, unique and check constraints.
In the Constraints grid, right-click the row or anywhere in the grid and select the required shortcut menu option:
- Add Check Constraints to create a CHECK constraint.
- Add Foreign Key to create a foreign key.
- Add Primary Key to create a primary key.
- Add Unique Key to create a unique key.
- Remove Constraint to delete the selected constraint. Alternatively, press Ctrl+Del.
Note
If a primary key is already set to a column, the Add Primary Key option is disabled.
When you select a constraint in the grid, it is highlighted in the T-SQL preview pane.
To manage constraint properties
In the Constraints grid, select the constraint and set or update its properties in the grid to the right.
Note
The properties displayed in the grid vary based on the selected constraint type.
To apply any changes, on the Table Editor toolbar, select Apply Changes.
Indexes
On the Indexes tab, you can create, modify, or delete indexes to optimize query performance.
In the Indexes grid, right-click the row or anywhere in the grid and select the required shortcut menu option:
- Add Clustered Index to create a clustered index.
- Add Non-Clustered Index to create a non-clustered index. Alternatively, press Ins.
- Add Primary XML Index to create a primary XML index.
- Add Secondary XML Index to create a secondary XML index.
- Add Spatial Index to create a spatial index.
- Add Nonclustered Columnstore Index to create a non-clustered columnstore index.
- Remove Index to delete the selected index. Alternatively, press Ctrl+Del.
In the grid, you can configure index properties by selecting the checkboxes for the required options:
- Included columns – Specify additional columns to be stored in a non-clustered index.
- Unique – Select the checkbox to prevent duplicate values in the indexed column. This property is usually used for primary keys and unique constraints.
- Disabled – Select the checkbox to turn off the index without deleting it. The index remains in the database and can be re-enabled when needed.
- Filtered – Select the checkbox to create an index with a WHERE clause to include only specific rows.
- Partitioned – Select the checkbox to split the index into smaller, manageable parts (partitions) based on a specified column.
- Auto Recompute Statistics – Select the checkbox to automatically update index statistics when significant data changes occur. By default, it is selected.
- Ignore Duplicates – Select the checkbox to ignore duplicate rows instead of causing an error. This option is applied to unique indexes.
- Fill Factor – Determine how much space is left free in index pages to allow for future inserts. The default value is 0.
When you select the index in the grid, it is also highlighted in the T-SQL preview pane.
You can also set up additional configurations for a specific index in the right property grid, which may be grouped into the following categories:
- General – Specify the index name, description, indexed and included columns, and index type. You can remove or sort indexed columns and specify a NULL or unique value.
- Options – Select or clear the checkboxes next to the options to customize the default behavior of indexes.
- Storage – Define how and where the index is stored within the database.
- Fragmentation – Measure how scattered the index pages are on the disk.
- Usage Statistics – Displays how often the index is used in queries.
Note
The properties displayed in the grid vary based on the selected index type.
Statistics
On the Statistics tab, you can view and update table statistics for query optimization.
In the Statistics grid, right-click the row or anywhere in the grid and select the required shortcut menu option:
- New Statistics to generate new statistics. Alternatively, press Ins.
- Delete Statistics to remove statistics. Alternatively, press Ctrl+Del.
In the Statistics grid, you can manage statistics by doing the following:
- Name – Indicates the name of the object for which statistics are generated.
- Columns – Lists the columns used to generate statistics.
- NORECOMPUTE – Controls whether statistics are automatically updated by SQL Server. When selected, SQL Server does not update statistics automatically. When cleared, SQL Server updates statistics when needed.
- INCREMENTAL – Specifies whether statistics updates are partition-based. When selected, it updates only the changed partitions instead of the entire table.
- Last Updated – Shows the last time statistics were updated.
You can also view and update additional properties for the statistics object in the right grid. The properties are arranged in two groups:
- General - View the statistics object name, description, statistics column, etc.
- Details – View and manage statistics details for a specific statistics object.
Triggers
On the Triggers tab, you can create and manage triggers at a row level that execute automatically in response to table events.
In the Triggers grid, right-click the row or anywhere in the grid and select the required shortcut menu option:
- Edit Trigger to modify the selected trigger. Alternatively, press Enter.
- New Trigger to create a new trigger. Alternatively, press Ins.
- Enable to turn on the selected trigger.
- Disable to turn off the selected trigger.
- Delete to delete the selected trigger. Alternatively, press Ctrl+Del.
In the Triggers grid, you can view or modify properties for a specific trigger:
- Name – Define a trigger name.
- Type – Specify when the trigger executes in response to a data modification event. The common types can be:
- AFTER (FOR), which is executed after an INSERT, UPDATE, or DELETE.
- INSTEAD OF, which replaces the standard action with custom logic.
- DDL Trigger, which fires on schema changes, for example, CREATE TABLE or ALTER TABLE.
- Event – Define the DML (INSERT, UPDATE, DELETE) or DDL (CREATE, ALTER, DROP) operation that fires the trigger.
- Not For Replication – Select the checkbox to prevent the trigger from firing during replication operations. When selected, the trigger is not executed when changes come from a replication agent.
- Enabled – Clear the checkbox to deactivate the trigger. By default, it is active.
- Encrypted – Select the checkbox to hidee the trigger definition from users.
To edit a trigger
1. In the Name/Type/Event column, double-click the value. This opens the CREATE TRIGGER statement in a new SQL document.
2. Edit the trigger.
3. On the Table Editor toolbar, select Apply Changes to save the changes and apply them to the trigger.
Storage
On the Storage tab, you can configure storage settings, including regular and filestream data spaces.
Data
On the Data tab, you can view, edit, and filter table data directly from the Data Editor. In the Data Editor, right-click the row and select the required option. For more information about the tasks you can perform on table data, see the Work with Data in Data Editor documentation.
T-SQL
On the T-SQL tab, you can preview a .sql script generated to create or modify a table. To manage the SQL text, right-click anywhere on the T-SQL tab and select the required option.
Table Editor toolbar
On the Table Editor toolbar, you can do the following:
- Refresh Object - Updates the table to reflect the latest changes (made).
- Apply Changes - Saves and applies changes made to the table.
- Script Changes - Generates a SQL script, allowing you to review, modify, or execute the script manually instead of applying changes immediately. You can also script changes to a new SQL document by selecting the To New SQL Window option from the Script Changes list or pressing Shift+Alt+C. Alternatively, copy to the clipboard by selecting the To Clipboard option from the Script Changes list.
Save the changes
An asterisk (*) in the file name on the tab title indicates unsaved changes. To save and apply them, select Apply Changes.
Want to find out more?
Overview
Take a quick tour to learn all about the key benefits delivered by dbForge Studio for SQL Server.
All features
Get acquainted with the rich features and capabilities of the tool in less than 5 minutes.
Request a demo
If you consider employing this tool for your business, request a demo to see it in action.