From the course: Learning SQL Server 2017

Unlock this course with a free trial

Join today to access over 25,500 courses taught by industry experts.

Create a data table

Create a data table

- [Instructor] In order to store data in a database, we need to create a table. The structure of a table is critical in creating a database that's easy to navigate and retrieve information from later. To create a new table in our custom database, I'll go ahead and expand the Databases node and find the database that we created called MyDatabase, then I'll expand that open and find the Tables folder. I'll right-click on it, point to New, and then click on Table. This will activate a second window where we can define the columns that'll make up the structure of our table. We simply need to give each column a name, define the type of data that it'll store, and then choose whether it'll be a required piece of information, which is the default state, or if we place a check in this box called Allow Nulls, we'll define an optional column that can be left blank when entering data. So, let's create a table to store…

Contents