Learning MySQL - CREATE TABLE

Published: 30 May 2019
on channel: Steve Griffith - Prof3ssorSt3v3
11,625
154

This tutorial explains how you can create your own custom tables as well as how to create new tables based on existing columns and data from one or more other tables.

MySQL Playlist -    • Learning MySQL - Getting Started  

MySQL CREATE TABLE reference - https://dev.mysql.com/doc/refman/5.7/...

Code from video -
DROP TABLE IF EXISTS people;

CREATE TABLE IF NOT EXISTS people (
person_id INT UNSIGNED AUTO_INCREMENT NOT NULL,
first_name VARCHAR(50) NOT NULL,
last_name VARCHAR(50) NOT NULL,
birth_year YEAR NOT NULL,
has_account tinyint(1) DEFAULT 0,
PRIMARY KEY (person_id)
)ENGINE = INNODB
COLLATE = 'utf8_general_ci'
AUTO_INCREMENT = 1000;

CREATE TABLE IF NOT EXISTS tv AS
SELECT show_id AS tv_id, show_title AS tv_title, num_seasons
FROM shows;


On this page of the site you can watch the video online Learning MySQL - CREATE TABLE with a duration of hours minute second in good quality, which was uploaded by the user Steve Griffith - Prof3ssorSt3v3 30 May 2019, share the link with friends and acquaintances, this video has already been watched 11,625 times on youtube and it was liked by 154 viewers. Enjoy your viewing!