Table Designer for SQL Server

dbForge Studio for SQL Server offers Table Designer, a visual object editor that helps build and modify SQL tables easily. Its intuitive interface facilitates smooth experience that will make you more productive, eliminate the need to write any complex code, and save lots of your time in the process.

This editor displays a convenient grid where you can create columns and manage their attributes, add comments and constraints, define indexes, set triggers, work with data, preview changes, and automatically generate SQL scripts based on these changes.

Columns

Table Designer delivers a full set of options that can be used to create new SQL tables or edit table data in the grid. It allows to add new columns in just one click, change column names, and specify major properties without opening any extra windows. Data types are assigned automatically according to column names.

By selecting the corresponding checkboxes, you can easily set and remove primary keys. To override the default database collation, you can set a different collation for a specific column. You can also make notes or add information about any required table using the Comments field.

Under the grid, all the introduced changes are immediately shown in the DDL table of the editor. If the view with the script is not required, you can always modify the window layout and hide it.

The available column properties are shown on the screenshot below.

Table Designer: Columns

Constraints

In order to ensure data integrity, you can proceed to the Constraints tab and do the following:

  • Create and/or remove CHECK constraints, define conditions for them
  • Add and/or remove unique, primary and foreign keys
  • Permit or restrict values that can be applied to a column
  • Restrict data types for a column to be added to a required table
Table Designer: Constraints

Indexes

In order to optimize queries and simplify grouping and sorting of tables, you can use indexes for table columns. Using a simple SQL table editor, you can add indexes to display relevant rows filtered by a specific column value. This simplifies and accelerates data retrieval without the need to check each row in the table.

Proceed to the Indexes tab to do the following:

  • Add and/or remove unique and non-unique indexes
  • Define index types: Clustered, XML, Clustered/Nonclustered Columnstore, or Spatial
Table Designer: Indexes

Statistics

Statistics are vital for effective preparation of a well-optimized execution plan, delivering distribution of column values to the query optimizer and helping estimate the number of rows. Faulty stats can cause inclusion of unnecessary operations in the plan, which in turn leads to wasted resources, as well as CPU and memory issues.

Table Designer has a special tab dedicated to easy creation and management of statistics; it also helps to maintain their relevance by keeping an eye on timely updates.

Table Designer: Statistics

Triggers

Using the table editor, you can easily create a trigger at the row level. It will be activated in response to SELECT, INSERT, ALTER, UPDATE, or DELETE events. You can define whether the trigger must be executed before or after the event. Additionally, triggers can be created with the help of snippets.

Triggers facilitate improved data integrity and consistency, because they are automatically activated after the changes have been introduced to the table.

Table Designer: Triggers

Storage

Configuring your SQL storage for a table can be critical to achieving maximum performance. Proceed to the Storage tab to define its properties, including regular and filestream data spaces.

Table Designer: Storage

Data editor

The built-in data editor allows to preview all the changes introduced to the table and manage data using the following features:

  • Filtering
  • Grouping
  • Sorting
  • Data layout: switching between row and card view
  • Viewing images stored in a table
  • Auto-search mode
  • Row versioning
Table Designer: Data Editor

In-place editor

Table Designer includes an in-place T-SQL editor that allows to edit any part of CREATE TABLE manually. If you make a change in your code, the corresponding values in the editor fields are changed accordingly. For a column that is selected in the visual editor, the respective SQL syntax is highlighted in the T-SQL editor.

The editor also delivers such functionality as code completion, formatting, refactoring, and much more.

Table Designer: In-Place Editor

Scripting changes

When you create a new table or modify an existing one, the introduced changes are shown as a CREATE statement in the editor. You can easily view a related script that contains information about the server and client versions, the date when the script was generated, the connected database, and the SQL statement of the table.

By default, the script can be generated to a new SQL document upon clicking Script Changes. However, if you want to copy the script to clipboard from the Table Designer, you can simply select the corresponding option from the Script Changes dropdown menu.

Table Designer: Scripting Changes

Get your free 30-day trial of dbForge Studio for SQL Server to see its value for yourself. All of its features, including Table Designer, were created to make work easy and enjoyable for you.