MySQL: How to create a TABLE

preview_player
Показать описание
#sql #MySQL #table

00:00:00 Intro
00:00:36 CREATE TABLE
00:03:00 SELECT * FROM TABLE
00:03:21 RENAME TABLE
00:03:54 DROP TABLE
00:04:11 Add a column
00:05:13 Rename a column
00:05:50 Modify a column
00:06:34 Change column position AFTER
00:07:32 Change column position FIRST
00:07:52 Drop a column
00:08:09 Conclusion

CREATE TABLE employees (
employee_id int PRIMARY KEY,
first_name VARCHAR(50),
last_name VARCHAR(50),
hourly_pay DECIMAL(5, 2),
hire_date DATE
);

RENAME TABLE employees TO workers;

DROP TABLE employees;

ALTER TABLE employees
ADD phone_number VARCHAR(15);

ALTER TABLE employees
RENAME COLUMN phone_number TO email;

ALTER TABLE employees
MODIFY COLUMN email VARCHAR(15);

ALTER TABLE employees
MODIFY email VARCHAR(100)
AFTER last_name;

ALTER TABLE employees
MODIFY email VARCHAR(100)
FIRST;

ALTER TABLE employees
DROP COLUMN email;
Рекомендации по теме
Комментарии
Автор

CREATE TABLE employees (
employee_id int,
first_name VARCHAR(50),
last_name VARCHAR(50),
hourly_pay DECIMAL(5, 2),
hire_date DATE

);

SELECT * FROM employees;

RENAME TABLE employees TO workers;

DROP TABLE employees;

ALTER TABLE employees
ADD phone_number VARCHAR(15);

ALTER TABLE employees
RENAME COLUMN phone_number TO email;

ALTER TABLE employees
MODIFY COLUMN email VARCHAR(100);

ALTER TABLE employees
MODIFY email VARCHAR(100)
AFTER last_name;

ALTER TABLE employees
MODIFY email VARCHAR(100)
FIRST;

ALTER TABLE employees
DROP COLUMN email;

BroCodez
Автор

Crazy how you post this the same week as I start with SQL. Thanks a lot.

wolfdare
Автор

hey bro, its so nice seeing you cover sql, an incredibly important language. thanks alot and keep the vids coming!!

andredubbs
Автор

I completely forgot how to do MySQL, after a year of not taking a subject that utilizes it.
Now I suddenly have an assignment due by midnight. So I just quickly needed a refresher.
Thank you for providing a short and to-the-point tutorial.

dewaldschuler
Автор

Your teaching methods are to the point, full of information, but can be easily and clearly understood. Thank you so much!

gamerslog
Автор

here's a series for SQL. Thanks a lot Bro!

HiraHana
Автор

Thank you very much for a very useful hand-on training!

alkh
Автор

you are out here doing the LORD'S WORK THANK

dejasbeautyxoxo
Автор

I'm gonna recommend this to everyone, your methods are just brilliant it goes to the point and just amazing thanks bro.
(sorry for bad English still learning)

Person_Alive
Автор

bro short and clear to understand tanks a lot

clvyyhx
Автор

Broilliant vid as usual.

Clear and and easy to follow.

Thanks Bro

FukSN
Автор

reallyyyy happy to see you back again🥺🥺

Realshamsaba
Автор

Hey bro, love your videos!!
Would you consider making NoSQL, GIT/GITHUB, Linux terminal videos in the near future?

omparghale
Автор

For numbers suppose if this is a real life job scenario, do we still use VARCHAR as a data type or is there any alternative to add larger numbers in a database? Like in Java you can use double or even long so is there something similar?

pratikthorat
Автор

I’m a regular visitor on this channel hahaha

visheshmukherjee
Автор

I did not know that Mr Krabs had a first name.

spacex
Автор

I’m self teaching. So I am a beginner and unfamiliar so please be patient with me. When do you use semi colons, asterisk and parenthesis? I know underscore is used for two words. Can you use sql for any software or is sql for a specific program ? What careers use sql? I see this skill listed under duties for data analyst . Thanks for this video very informative

Diyanibeats
Автор

stop giving me exactly what I need for tomorrow every time its getting creepy .

imhungry
Автор

thank you so much bro code I'm your handicap student

kaustubh
Автор

What software did you use in getting this done ols

ojeborsuccess