Foreign key relationships may occasionally need to be inserted at the same time as the primary key. We won’t know what the primary key will
Tag: Transaction in MySQL
Last Insert ID in MySQL
LAST_INSERT_ID() function return the AUTO_INCREMENT id of the last row that has been inserted or updated in a table. Here is an example. DROP TABLE
MySQL Rollback Changes
All user activity in InnoDB takes place within a transaction. Each SQL query produces its own transaction when the auto-commit mode is enabled. Every time