Home  >  Article  >  Database  >  MySQL transaction rollback demonstration detailed explanation

MySQL transaction rollback demonstration detailed explanation

黄舟
黄舟Original
2017-08-02 15:42:282526browse

MySQL transaction rollback demonstration detailed explanation

1. First look at the data in the student table

MySQL transaction rollback demonstration detailed explanation

2. Enter start transaction to open the transaction

MySQL transaction rollback demonstration detailed explanation

3. Update first Row the data, and then check the results and find that the update was successful.

MySQL transaction rollback demonstration detailed explanation

4. Pay attention, the rollback starts here. Enter rollback. Then look at the data in the first row, and you can find that it has changed back with the new data.

MySQL transaction rollback demonstration detailed explanation

5. Finally, when we look at the entire table, we can see that it is still the same as before.

MySQL transaction rollback demonstration detailed explanation

The above is the detailed content of MySQL transaction rollback demonstration detailed explanation. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn