"SET foreign_key_checks = 0"的范围是什么? [英] What is the scope of 'SET foreign_key_checks = 0'?

查看:611
本文介绍了"SET foreign_key_checks = 0"的范围是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

真的找不到任何详细信息,但是'SET foreign_key_checks = 0'的范围是当前连接,当前会话还是当前事务?

Can't really find any details on this, but is the scope of 'SET foreign_key_checks = 0' the current connection, current session or current transaction?

推荐答案

这是基于会话的语句.

这是临时打破外键约束.有时必须以在修改过程中需要破坏参照完整性的方式来更改数据.

This is to temporarily break the Foreign Key Constraint. It is sometimes necessary to change data in a way that referential integrity needs to be broken during the modification process.

这篇关于"SET foreign_key_checks = 0"的范围是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆