1 Transakce 1.1 Prakticky Vytvořme tedy nějakou tabulku: CREATE TABLE `studenti` ( `uzivatele_id` int, `jmeno` varchar(60), `prijmeni` varchar(60), `pohlavi` varchar(1), `PLAT` int, `datum_narozeni` date, `mesto` varchar(20), `fakulta` int) ENGINE=INNODB; naplňme ji daty: insert into studenti values ('1', 'jana', 'krátka', 'f', '23500', '1954-12-22', 'Brno', '0'); insert into studenti values ('2', 'Jana', 'Nováková', 'F', '42261', '2016-11-11', 'Brno', '1'); insert into studenti values ('3', 'Sophia', 'Santiago', 'F', '20758', '1962-11-16', 'Brno', '8'); insert into studenti values ('4', 'Jarek', 'Benes', 'M', '52483', '2017-01-11', 'Praha', '8'); insert into studenti values ('5', 'Petr', 'Malý', 'M', '10000', '2001-09-23', 'Praha', '8'); a zkusme to celé provést. Půjdeme na to takto: START TRANSACTION; update studenti set plat=plat+2000 where plat < 15000; update studenti set plat=plat*1.1; COMMIT; START TRANSACTION; update studenti set plat=plat+2000 where plat < 15000; update studenti set plat=plat*1.1; ROLLBACK;