MySQL: How to UPDATE and DELETE data from a TABLE

preview_player
Показать описание
#MySQL #SQL #database

00:00:00 UPDATE
00:01:14 UPDATE multiple fields
00:01:55 UPDATE a field as NULL
00:02:16 UPDATE an entire row
00:02:45 DELETE a row

UPDATE employees
SET hourly_pay = 10.25
WHERE employee_id = 6;
SELECT * FROM employees;

DELETE FROM employees
WHERE employee_id = 6;
SELECT * FROM employees;
Рекомендации по теме
Комментарии
Автор

UPDATE employees
SET hourly_pay = 10.25
WHERE employee_id = 6;
SELECT * FROM employees;

DELETE FROM employees
WHERE employee_id = 6;
SELECT * FROM employees;

BroCodez
Автор

If I just waited until the very end, I wouldn't have had to delete my entire TABLE and start again. I accidentally created 2 of the exact same because I did have the SELECT * FROM employees; after creating VALUE (3, "Me", "You", 50.00, "2020-02-28"); so I had 2 copies of it. Could not figure out how to delete it since I could not call on it since it had an exact copy.

If I waited, I could have only had to delete 2 rows instead of all 8.
Thank you for making these! Make's learning a hell of a lot easier. You're a life saver and a wizard!

gamerslog
Автор

update functioin is not working

You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column.
To disable safe mode, toggle the option in Preferences -> SQL Editor and reconnect. 0.000 sec

samuraychik
Автор

Legit the greatest channel for tutorials, keep up the excellent work bro

elliotradley
Автор

u really help alot! thanks to u im not failing in IT!

anayasarintayn
Автор

Great stuff, but why is Plankton only paid 10.50 and Sandy 17? He has experience running a fast food restaurant. As far as I know Sandy is just a scientist. 😅

jenshardervingaardlarsen
Автор

Hey bro, love your videos ! I was wondering if you could make a tutorial series on OpenGL in C++, i know there's a lot of those on youtube but that would be really cool if it was explained by you. I don't mind if you can't, but that would be really appreciated.

derman
Автор

hey bro, great video as per usual. thanks alot!

andredubbs
Автор

23:08:34 UPDATE employees SET hourly_pay = 10.50, hire_date = "2023-01-06" WHERE employee_id = 4 Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column. To disable safe mode, toggle the option in Preferences -> SQL Editor and reconnect. 0.000 sec

TranXuanDucPH
Автор

"alter table employees add primary key (userid)" use this for safe update error. But userid must include all unique and not null values.

emrebilen
Автор

after deleting the data from the table how did u regain the data

markkariuki
Автор

Hello bro! Hope you are doing amazing. We are patiently waiting for a React course. Thanks in advance.

MeuTube
Автор

daamn i just deleted all the rows 🤦‍♂, should have waited.

rahulsaibanala
Автор

why cant you use "modify" or "alter" to update or delete data?

saimoomsikto
Автор

Please can you make C++ Data structures video like for Java?? You explain so good

vnipkpj
Автор

Hey bro, I'd be really really really appreciate if you create a video on how we can build an analog clock in java

ToughNevyHacSoc
Автор

hey bro i wonder if you could do a rust full course i know theres other rust courses but they are ba and they skip to complex things so i wonder if you can make one

cppandjavaandkotlindev
Автор

Bro i'm getting error "You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column. To disable safe mode, toggle the option in Preferences -> SQL Editor and reconnect." while using the update command somebody please help.

IrfanKhan-bkjy
Автор

update fonction is not working
SET SQL_SAFE_UPDATES = 0;
disable safe update

houdahammachi
Автор

Im a beginner, incidentally made null values in employee_id column for all, how do i replace them with number values. Thanks anyone who hleps

elizataylor