From the course: MySQL Essential Training (2019)

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

The CREATE TABLE statement

The CREATE TABLE statement - MySQL Tutorial

From the course: MySQL Essential Training (2019)

The CREATE TABLE statement

- [Instructor] Just like a database contains tables, a table contains rows and columns for a given set of data. The table definition contains the details of a dataset. Because of this, the create table statement has a lot more options than the create database statement. For this lesson we'll use the scratch database here in My SQL Workbench. I'm connected with my admin connection and I'll say use scratch and execute that. And now we're going to create a table, and so I'm going to copy and paste from my exercise files here, this create table statement and I'm going to go ahead and execute that and the table is now created. We'll get into all the column types later in the course, but briefly this is how this works. A relational database table has a set of columns with particular characteristics. The definition of those columns is within the parenthesis in the create table statement. So I have this open parenthesis here and this close parenthesis here, and inside of those parenthesis is…

Contents