From the course: Learning MySQL Development

Unlock the full course today

Join today to access over 24,900 courses taught by industry experts.

Use CREATE and ALTER to define a table

Use CREATE and ALTER to define a table - MySQL Tutorial

From the course: Learning MySQL Development

Use CREATE and ALTER to define a table

- [Instructor] Although the MySQL Workbench has a fully featured graphical interface tool for creating and modifying tables, there's value in understanding the raw SQL statements that those tools generate. To begin with, I'm going to drop the existing movies_basic table. This will instantly and irreversibly delete it from the database, so I'm going to click Review SQL, just to make sure I'm doing what I intend. And I do want to drop the movies_basic table from the movies database, so I'll click execute and that table is gone. Instead of opening the Create Table screen, I'm going to use this new blank SQL tab. I want to recreate the movies_basic table using the Create Table statement. So I'm going to start with Create Table, movies_basic and then with an open parentheses I'm going to start defining my columns. I need to include their name, their data type and any column flags that I want to be enabled. So I want to start…

Contents