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 - 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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
Create a database2m 13s
-
(Locked)
Create a table5m 51s
-
(Locked)
Use CREATE and ALTER to define a table3m 55s
-
(Locked)
Primary keys and foreign keys2m 37s
-
(Locked)
Display database relationships with reverse engineering3m 56s
-
(Locked)
Load bulk data3m 50s
-
(Locked)
Challenge: Create a normalized movies table1m 3s
-
(Locked)
Solution: Create a normalized movies table7m 4s
-
-
-
-
-