How to Create Tables in SQL Management Studio

Save

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.

  • 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.

  • 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.

  • 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.

  • 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.

  • 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.

References

  • Photo Credit Burke/Triolo Productions/Brand X Pictures/Getty Images
Promoted By Zergnet

Comments

You May Also Like

Related Searches

Check It Out

Geek Vs Geek: Robot battles, hoverboard drag race, and more

M
Is DIY in your DNA? Become part of our maker community.
Submit Your Work!