Follow these directions to create a new table in Microsoft SQL Server.
- In SQL Server, expand Databases > database
- Right-click Tables > Table...
- In the main pane, a form appears. I always create the following columns in every table:
- id (int, not null, auto increment, primary key)
- date_inserted (date, not null)
- 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.
- Click the disk (save) icon.
- In the Choose Name pop-up box, enter the name of the table and click OK.
- In Object Explorer, click the refresh icon (F5), and the newly created table should appear under the Tables folder.