Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MySQL has no transaction support?

I heard MySQL has no transaction support at all? Is that true? If yes, how could people write reliable code to make sure data consistency and reliable compared to other commercial database (e.g. Oracle/SQL Server)?

thanks in advance, George

like image 610
George2 Avatar asked Dec 13 '22 01:12

George2


1 Answers

Actually MySQL does include support for transactions through the InnoDB storage engine which is bundled with MySQL. It's not the default storage engine but that setting can be changed. Or you can simply specify the engine when creating your tables.

create table mytable (...) engine=innodb;
like image 55
Asaph Avatar answered Dec 23 '22 15:12

Asaph