Pages

Sunday, September 8, 2013

How to Create Tables in SQL Management Studio

How to Create Tables in SQL Management Studio

The Microsoft SQL Server Management Studio is an application used to connect to SQL servers. The software replaced the old Enterprise Manager with a better interface and easier management of multiple database servers. The management console can be used to create a table within a database. It has a designer, so you add columns and data types using a graphical interface instead of entering SQL commands in the command line.

Instructions

    1

    Right-click the database in which you want the table to appear. A menu is shown. Select "New Table" from the list of menu items.

    2

    Type column names on the left side of the table viewer. The table view is the place where you add your column names and data types.

    3

    Select a data type for each column. The data type is a drop-down menu item. The data type should be carefully considered. For instance, if you set the data type as numeric but enter string values, the database engine returns an error.

    4

    Right-click one of the columns that is unique to the table and select "Primary Key." Every table should contain a primary key, or your performance will plummet. The primary key is a unique value within the table. Some people choose to create an ID field that increments each time a new record is entered, which ensures there is always a unique value in the table.

    5

    Click the "Save" button on the SQL Server Management Studio toolbar. A window pops up asking for a table name. Enter it into the text box and press the "Ok" button. The table is created and saved in your database.

0 comments:

Post a Comment