Adding Tables To A Database Project




By:

Overview

We've created our project and set deployment properties and database options. Now it's time to create a table!

Explanation

In the Schema View, navigate to Schemas folder and under the dbo schema and right click on Tables. The option to Add a table will appear:

Schema View

Clicking on Table... presents the Add New Item screen. The Name field will default to something like Table1. We change this value to FootBallClub and click Add:

Clicking on Table... presents the Add New Item screen

A script window will appear with a template script with the name of the table as follows

A script window will appear with a template script

We change the template code as follows to match the table layout we want to maintain

change the template code as follows

Saving the changes will show the table under Tables in the Schema View.


Last Update: 9/10/2011





More SQL Server Solutions











Post a comment or let the author know this tip helped.

All comments are reviewed, so stay on subject or we may delete your comment. Note: your email address is not published. Required fields are marked with an asterisk (*).

*Name
*Email
Email me updates

Signup for our newsletter

I agree by submitting my data to receive communications, account updates and/or special offers about SQL Server from MSSQLTips and/or its Sponsors. I have read the privacy statement and understand I may unsubscribe at any time.






download


get free sql tips

I agree by submitting my data to receive communications, account updates and/or special offers about SQL Server from MSSQLTips and/or its Sponsors. I have read the privacy statement and understand I may unsubscribe at any time.



Learn more about SQL Server tools