insert into master_card(name,account1) values('Nicat',1700.77); insert into web_money(name,account2) values('Fizuli',800.24);
Indi isə tranzaksiyamızı başlada bilərik:
start transaction; update master_card set account1= account1-500
where id=1;update web_money set account2= account2 +500 where id=1;COMMIT; Bu sorğunu icra etdikdən sonra
select * from master_card; və select * from web_money;yazmaqla müvafiq dəyişikliyi görə bilərik.
Əgər hər hansı bir yalnışlıq ucbatından bazada dəyişiklik olmasını istəmiriksə bu zaman sonda ROLLBACK yazırıq:
start transaction; update master_card set account1= account1-500
where id=1;update web_money set account2= account2 +500 where id=1;ROLLBACK;