MySQL: How to create a TABLE
HTML-код
- Опубликовано: 9 июл 2024
- #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;
Twelfth comment I was the tenth
Yo man 👋 I have a question about your SQL lessons: will there be a complete tutorial for beginners for it like for the other languages?
Thanks again for all of your work
@@matthewmurdock7329 it depends if people continue watching.
@@YeahEsCerealin 😅hindi 2:26 😅😅😮😅😅😅
@@matthewmurdock7329in 😅😅
Crazy how you post this the same week as I start with SQL. Thanks a lot.
hey bro, its so nice seeing you cover sql, an incredibly important language. thanks alot and keep the vids coming!!
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.
FINALLYYYYY, here's a series for SQL. Thanks a lot Bro!
Your teaching methods are to the point, full of information, but can be easily and clearly understood. Thank you so much!
Assalam o alaikum .
Kindly guide kryen .
Ye kis app per bnai ha .
Mean Kia install Kia then is per work Kia ha.
Thank you very much for a very useful hand-on training!
you are out here doing the LORD'S WORK THANK YOU!!!!!!!!
THANKS A LOT KING
Bro, you are awesome, bro!
simple and clear, thanks.
Thank you!!
Legendary !
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)
Bro that's perfect, Never apologise for trying to learn a new language, Your doing good buddy
good to see u again
Broilliant vid as usual.
Clear and and easy to follow.
Thanks Bro
Just wow❤
bro i love u ur amazing
bro u are just awesome
reallyyyy happy to see you back again🥺🥺
bro ur beast in teaching
Ty bro
great work dear
Bro you are wonderful 👍
I’m a regular visitor on this channel hahaha
thank you bro
Hey bro, love your videos!!
Would you consider making NoSQL,GIT/GITHUB,Linux terminal videos in the near future?
thenks bro 🤔
thanks bro
thank you so much bro code I'm your handicap student
stop giving me exactly what I need for tomorrow every time its getting creepy .
Liiiikkeeeee!😂
😂😂
Relateeeee
Top top top
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?
Thanks
I did not know that Mr Krabs had a first name.
Same
Yeah
Love you bro❤️❤️
Sixth
yes pleaaaase full SQL tutorial
good
Please help me with this problem: I type the same thing as BroCode did However, the issue is Error while executing SQL query on database 'sample': near "RENAME": syntax error.
Same as me.Did you find a solution til now?
@@VesaShehu-bj8js it actually depends on which SQL application u are using. I'm using SQLite so this query will work for me:
ALTER TABLE table_name RENAME TO new_table_name;
👍👍
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
SQL, sweet. Maybe react or firebase tutorials in the future.
Please create a full tutorial on rust
For:
ALTER TABLE employees
MODIFY COLUMN email VARCHAR(50)
my ALTER is error-highlighted with the statement ' "ALTER" is not valid at this point, expecting EOF, ';' '
I've refreshed, checked my version (8.0.36), and generally looked it over, but no luck.
The Modify clause isnt working. It does'nt highlight or anthing like ALTER or SELECT, almost as if mysql is reading it as normal txt. Anyone else has this problem?
Hi,
I am getting an error when trying to create a table.
'Can't find master key from keyring'.
First bro!
Fifth
Why is my interface different than yours? 😢
Where did the dark thingy thing comes from
Hello sir,
I'm glad that i found your channel to learn SQL. I'm completely new to this subject.
i came across an error while creating a table column (" hourly pay decimal(5,1)"). could you please clarify?
You need to have an underscore in between when it has two words. So it should be
"hourly__pay DECIMAL(5,1)"
float can also be used@@syedathif3357
Code king 👑 bro code
HOW to get rid if error Table already exists
Bro or Sir please upload REACTJS full course
More SQL please sir
sir thr was error in install the key ring pugin plss hlp
hey bro code
i'm trying to tape the same scrito but i get this error:
''Error Code: 1046. No database selected Select the default DB to be used by double-clicking its name in the SCHEMAS list in the sidebar.''
how to solve it please
Double-click on the database to be used on the schemas, for example, he is using mydb, it'd be in bold
yo bro can u teach us php because im strugling with it ❤
Astrix is also known as star.
HELLLOOOOOOOIOO
First
We want courses in cyber security and ethical hacking
Second
Eighth
React Js please!
First haha
Second
Why make things complicated using this SQL when companies can use excel and Microsoft access?
#heidisqlgang
i wish i could shake hands with you
I got an error 1064. please help me
Same. Did u figure it out? It keeps happening with decimals😫
#bringbackjavatut lol!
BroDeed
SQL
Tenth
Bro code!
React Js please!