MySQL: AUTOCOMMIT, COMMIT, ROLLBACK

preview_player
Показать описание
#MySQL #tutorial #course

SET AUTOCOMMIT = OFF;
COMMIT;
ROLLBACK;
Рекомендации по теме
Комментарии
Автор

In case you accidentally delete all the rows AND THEN commit, here's the rows again:

INSERT INTO employees
VALUES (1, 'Eugene', 'Krabs', 25.50, '2023-01-02'),
(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');

BroCodez
Автор

thank you for your explanation! God bless!

adhy
Автор

Thanks, mate! I had to use the autocommit = off and then just execute "commit;" to make my transactions work!

IvoryMadness.
Автор

Shouldn't you use START TRANSACTION; to begin? or is that unneeded in MySQL? To be honest I've never not done it that way, just assumed it was needed.

davidc
Автор

its helpful and important to me thanks ❤

conengineer
Автор

That's a lot of accidents lol Great explanation. Thank you

happyathiest
Автор

Working of Commit and rollback both are same ?

Laturkar_brand
Автор

you forgot to explain about how to use start transaction;

akna
Автор

what if I accidentally delete 1 row in my table, that commnad will work or not ? if it's not what way should I do ?

seancarlopiodo
Автор

What's this?! Bro, just live on the edge! Be a runner, drop the autocommit stuff! Bro, trust me bro.

tsunamio
Автор

really a bro who can explain and implement the concept in less than 3 minutes your video is really helpful Who did cs with DB:)  
thank a lot sharing the content-free

frozenheart