568数据 568数据


MySQL Variables updatable_views_with_limit 数据库 参数变量解释及正确配置使用

网络编程 MySQL Variables updatable_views_with_limit 数据库 参数变量解释及正确配置使用 10-15

本站中文解释

updatable_views_with_limit参数控制MySQL是否允许在有限制的情况下更新可更新视图(UPDATABLE VIEWS)。

默认情况下,MySQL不允许在有限制的情况下更新可更新视图。如果需要允许在有限制的情况下更新可更新视图,则可以通过以下方式设置updatable_views_with_limit参数:

将该参数设置为1或ON:

SET GLOBAL updatable_views_with_limit=1;

或者可以将该参数设置为0或OFF:

SET GLOBAL updatable_views_with_limit=0;

官方英文解释

updatable_views_with_limit

Command-Line Format--updatable-views-with-limit[={OFF|ON}]
System Variableupdatable_views_with_limit
ScopeGlobal, Session
DynamicYes
TypeBoolean
Default Value1

This variable controls whether updates to a view can be made
when the view does not contain all columns of the primary key
defined in the underlying table, if the update statement
contains a LIMIT clause. (Such updates
often are generated by GUI tools.) An update is an
UPDATE or
DELETE statement. Primary key
here means a PRIMARY KEY, or a
UNIQUE index in which no column can contain
NULL.

The variable can have two values:

  • 1 or YES: Issue a
    warning only (not an error message). This is the default
    value.

  • 0 or NO: Prohibit
    the update.


编辑:568数据

标签:视图,情况下,参数,设置为,将该