تقييمات الطلاب
( 5 من 5 )
١ تقييمات
فيديو شرح Learning MySQL - CREATE TABLE ضمن كورس MySQL SQL شرح قناة Steve Griffith - Prof3ssorSt3v3، الفديو رقم 21 مجانى معتمد اونلاين
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 - https://www.youtube.com/watch?va9W7OpS4LfI&listPLyuRouwmQCjlXvBkTfGeDTq79r9_GoMt9
MySQL CREATE TABLE reference - https://dev.mysql.com/doc/refman/5.7/en/create-table.html
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;