MySQL: How to INSERT rows into a TABLE
Вставка
- Опубліковано 10 жов 2022
- #mysql
-- EXAMPLE 1 --
INSERT INTO employees
VALUES (1, "Eugene", "Krabs", 25.50, "2023-01-02");
SELECT * FROM employees;
-- EXAMPLE 2 --
INSERT INTO employees
VALUES (2, "Squidward", "Tentacles", 15.00, "2023-01-03"),
(3, "Spongebob", "Squarepants", 12.50, "2023-01-04"),
(4, "Patrick", "Star", 12.50, "2023-01-05"),
(5, "Sandy", "Cheeks", 17.25, "2023-01-06");
SELECT * FROM employees;
-- EXAMPLE 3 --
INSERT INTO employees (employee_id, first_name, last_name)
VALUES (6, "Sheldon", "Plankton");
SELECT * FROM employees;
-- EXAMPLE 1 --
INSERT INTO employees
VALUES (1, "Eugene", "Krabs", 25.50, "2023-01-02");
SELECT * FROM employees;
-- EXAMPLE 2 --
INSERT INTO employees
VALUES (2, "Squidward", "Tentacles", 15.00, "2023-01-03"),
(3, "Spongebob", "Squarepants", 12.50, "2023-01-04"),
(4, "Patrick", "Star", 12.50, "2023-01-05"),
(5, "Sandy", "Cheeks", 17.25, "2023-01-06");
SELECT * FROM employees;
-- EXAMPLE 3 --
INSERT INTO employees (employee_id, first_name, last_name)
VALUES (6, "Sheldon", "Plankton");
SELECT * FROM employees;
Bro called her sandy cheeks and thought we wouldn’t notice 😂
Thank you! This was helpful 👏🏽
You killed it bro. Thanks
bro has helped me more than my teachers ever could :skull:
Bro you made me cry, you're too good to make such a thought thing into an easy thing. LoL bro Lol
Thanks for the video❤
Thank you so much Bro❤❤
Bro is a goat in this field, keep it up
🇿🇼🇿🇼🇿🇼
thank you bro for sharing with such precious knowledges. God bless you man
Thank you so much Broo
you are the best thank you so much
Amazing work Bro. Please keep it up & give us more tutorials about SQL learning & practical projects. Waiting for your replay
cool video bro!
Why and how, only 31 comments bro you deserve a lot more
1 comment Felling lucky with every other bro
trying to learn python although, your videos help a lot, I get bored after some time of learning like I need the thing I know to use for real-life problems what can I do
Is the fact that you are getting column names on the empty set a feature of the sql workbench? Cause all I get, on an empty set, is "empty set".
I'd have to use "show columns" for that.
is there commit or rollback command like oracle?
Eugene?
BRO CHAD GANG GANG BOOM
How can I delete a duplicate row?
When I follow the query example and it says: values ( and write I write the information of the employee) and then I run the query and check the table the row repeats🧐
I have a question, so how would I update the row once I have the information for the missing columns?
My man how do I add an image to a table? and if so anyway to view it?
in last how to add the records in remaining two columns
question, whats mysql and what is its purpose?
It's a language to query a database
Question. You set the hourly pay to DECIMAL. What if it was a whole number woulf it matter?
Just use INT
Use INT
how to remove dupicate rows
im getting this error
17:57:10 INSERT INTO employees VALUES (1, "Eugene", "Krabs", 25, "2023-01-02") Error Code: 1136. Column count doesn't match value count at row 1 0.000 sec
hope you can help me !
my problem was i left the email section in check to make sure you have the correct amount of columns use code:
alter table employees
drop column email;
to remove a column.
then add the code again should work.
@@brandonh9142 thanks 🙏 I will give it a try
@@essammakia3475 Did it work? Having same issue
@@KrAyOnS1 no it did not work for me sadly
hey bro code. at 5:09 can we just insert null values instead of telling mysql which columns we will insert?
hey did you find the solution i have the same problem
How to make ai for games in html using javascript
Something doesnt work for me. When i try to print the table (SELECT * FROM employees) my whole program crashes. Whats wrong there? Am i the only one having this issue?
did you ever figure out what was happening
Actually no
A random comment to hack youtube algorithm
Bro is Bro
:((
:))
NO GO TUTORIAL @brocode WTF
y tho?