How to create a new table in Microsoft SQL Server

Home > Search > How-to
  by

Follow these directions to create a new table in Microsoft SQL Server.

  1. In SQL Server, expand Databases > database
  2. Right-click Tables > Table...
  3. In the main pane, a form appears. I always create the following columns in every table:
    • id (int, not null, auto increment, primary key)
    1. date_inserted (date, not null)
    2. date_updated (date, not null)

      Note: To auto increment the id field, in Column Properties, expand Identity Specification and change Is Identity to Yes.

      Note: To set the id field as the Primary Key, right-click the blank space just to the left of id and select Primary Key.

  1. Click the disk (save) icon.
  2. In the Choose Name pop-up box, enter the name of the table and click OK.
  3. In Object Explorer, click the refresh icon (F5), and the newly created table should appear under the Tables folder.


Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




Please enter in the box below so that we can be sure you are a human.




Comments