What is the scope of "SET foreign_key_checks = 0"?

It is not possible to find any information about this, but is the "SET foreign_key_checks = 0" area the current connection, the current session, or the current transaction?

+6
source share
2 answers

This is a session statement.

This temporarily violates the foreign key constraint. Sometimes it is necessary to change data so that referential integrity is compromised during the modification process.

+6
source

The answer can be found here : "It is based on the session. Take a test to make sure, but this is my understanding of this."

+5
source

All Articles