The popular understanding of transaction processing is to either do it all or not.
Affairs
Several terms you need to know about transaction processing:
transaction transaction refers to a set of SQL statements,
rollback refers to the process of revoking the specified SQL,
commit refers to the process of writing
unstored SQL to the database, savepoint refers to the process of transaction processing Temporary placeholder for setting
Management affairs
START TRANSACTION
# SQL语句1
# SQL语句2
ROLLBACK
START TRANSACTION
# SQL语句1
# SQL语句2
COMMIT
START TRANSACTION
SAVEPOINT xxx1
SAVEPOINT xxx2
ROLLBACK TO xxx1
Check whether the transaction is automatically committed
show variables like 'autocommit'
Transaction isolation level
To be continued
mysql data type
The data type defines what data can be stored in the column, and the basic rules for how the data is actually stored.
One question can VARCHAR columns be indexed?
String
CHAR
VARCHAR
TEXT
Number
INT
BIGINT
DECIMAL
Date and time
DATE
DATETIME
mysql index
Timely return blood