From the course: Learning Microsoft SQL Server 2019

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Create a data table

Create a data table - SQL Server Tutorial

From the course: Learning Microsoft SQL Server 2019

Start my 1-month free trial

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'm going to expand the Databases folder on our server, and then find the database that we want to work with. In my case, the LandonHotel database. Then, I'll expand that folder 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 out the structure of our table. We simply need to give each column a name, give it a data type, and decide whether we want to allow nulls or not in this column. If we leave this check box unchecked, which is the default state, it'll require this piece of information to be entered before it'll save it to the data table. If I decided this piece of information is going to be optional in our data…

Contents