How to create a table in SQL Server database

A table is the database object that contain all the data in a database. In tables, data is logically organized in a row-and-column format similar to a spreadsheet. You can create a table, name it, and add it to an existing database in an SQL Server instance by using dbForge Studio for SQL Server.

This topic demonstrates how to create a new table that does not contain any data. Nevertheless, while creating the table you must decide what types of data you want to store in it.

To create a table with Table Editor

1. In Database Explorer, connect to the instance of database engine that contains the database to be modified. 2. Expand the connection node and then expand the database that will contain the new table. 3. Right-click the Tables node of your database and then click New Table. The Table Editor opens.

New Table Shortcut

4. In the Name text box, type the table name. 5. Optionally, add a description. 6. By default, the table is contained in the dbo schema. To specify a different schema for the table, from the Schema drop-down list, select the appropriate schema. 7. Type column names, choose data types, and choose whether to allow nulls for each column as shown in the following illustration. Optionally, add a description. 8. To specify a column as a primary key, click the check box next to the column name.

Table Editor

9. Click Apply Changes.

Note
In order to create a table, you must have the CREATE TABLE permission in the database and ALTER permission on the schema in which the table is being created.

Want to Find out More?

Overview

Overview

Take a quick tour to learn all about the key benefits delivered by dbForge Studio for SQL Server.
All Features

All features

Get acquainted with the rich features and capabilities of the Studio in less than 5 minutes.
Request a demo

Request a demo

If you consider employing the Studio for your business, request a demo to see it in action.
Ready to start using dbForge Studio for SQL Server?