All the tables are of the same structure,does MySQL support this kind of operation?
3 Answers
This is not possible, but you could execute two (or more!) statements within a single transaction, thus treating the two operations as a single atomic operation. However, by default your database is most likely auto-committing after each statement, thus making a separate transaction for each executed statement. Refer to the manual's section on START TRANSACTION, COMMIT, and ROLLBACK syntax for more information on how to change this.
In general, though, I wouldn't recommend turning off auto-commit unless you're really sure you understand the implications of doing so.