SQL DROP VIEW 语句中的删除行为
Drop behavior in SQL DROP VIEW statement
是声明:
DROP VIEW <view-name>
有效的 sql92 语法?在某些数据库(例如 Postgres、Redshift)中,可以选择明确定义放置行为
DROP VIEW <view-name> [RESTRICT|CASCADE]
而对于其他人来说,这是强制性的(例如 Netteza)
DROP VIEW <view-name> {RESTRICT|CASCADE}
或者只是语法不支持(例如 Transact-sql)。
关于放置行为的放置视图语法,sql92 标准规定了什么?
我没有在 sql92 语法中找到任何提及删除行为的内容。
是的,符合 SQL 92 标准,语法是
<drop view statement> ::=
DROP VIEW <table name> <drop behavior>
Syntax Rules
1) Let V be the table identified by the and let VN
be that . The schema identified by the explicit or
implicit schema name of VN shall include the descriptor of V.
2) V shall be a viewed table.
3) If RESTRICT is specified, then V shall not be referenced in
the of any view descriptor or the of any assertion descriptor or constraint descriptor.
Note: If CASCADE is specified, then any such dependent object
will be dropped by the execution of the <revoke statement> spec-
ified in the General Rules of this Subclause.
Access Rules
1) The current shall be equal to the
that owns the schema identified by
the of the table identified by VN.
General Rules
1) Let A be the current . The following
is effectively executed with a current of "_SYSTEM" and without further Access
Rule checking:
REVOKE ALL PRIVILEGES ON VN FROM A CASCADE
2) The identified view and its descriptor are destroyed.
Leveling Rules
1) The following restrictions apply for Intermediate SQL:
None.
2) The following restrictions apply for Entry SQL in addition to
any Intermediate SQL restrictions:
a) Conforming Entry SQL language shall not contain a <drop view
statement>.
您可以查看wiki article . At the bottom, in the "External Links" you can find The SQL-92 standard。向下滚动到“X3H2-92-154/DBL CBR-002, 11.20 ”,您可以在那里找到:
<drop view statement> ::=
DROP VIEW <table name> <drop behavior>
Note: If CASCADE is specified, then any such dependent object
will be dropped by the execution of the <revoke statement> spec-
ified in the General Rules of this Subclause.
在 ANSI-92 标准中,RESTRICT
和 CASCADE
都在 11.20
节中作为 <drop behavior>
限定词提及
If RESTRICT is specified, then V shall not be referenced in
the of any view descriptor or the of any assertion descriptor or constraint descriptor
Note: If CASCADE is specified, then any such dependent object
will be dropped by the execution of the spec-
ified in the General Rules of this Subclause.
在此处搜索 <drop behavior>
,第 6 次出现浏览量
https://www.contrib.andrew.cmu.edu/~shadow/sql/sql1992.txt
是声明:
DROP VIEW <view-name>
有效的 sql92 语法?在某些数据库(例如 Postgres、Redshift)中,可以选择明确定义放置行为
DROP VIEW <view-name> [RESTRICT|CASCADE]
而对于其他人来说,这是强制性的(例如 Netteza)
DROP VIEW <view-name> {RESTRICT|CASCADE}
或者只是语法不支持(例如 Transact-sql)。
关于放置行为的放置视图语法,sql92 标准规定了什么? 我没有在 sql92 语法中找到任何提及删除行为的内容。
是的,符合 SQL 92 标准,语法是
<drop view statement> ::=
DROP VIEW <table name> <drop behavior>
Syntax Rules
1) Let V be the table identified by the and let VN be that . The schema identified by the explicit or implicit schema name of VN shall include the descriptor of V.
2) V shall be a viewed table.
3) If RESTRICT is specified, then V shall not be referenced in the of any view descriptor or the of any assertion descriptor or constraint descriptor.
Note: If CASCADE is specified, then any such dependent object will be dropped by the execution of the <revoke statement> spec- ified in the General Rules of this Subclause.
Access Rules
1) The current shall be equal to the that owns the schema identified by the of the table identified by VN.
General Rules
1) Let A be the current . The following is effectively executed with a current of "_SYSTEM" and without further Access Rule checking:
REVOKE ALL PRIVILEGES ON VN FROM A CASCADE
2) The identified view and its descriptor are destroyed.
Leveling Rules
1) The following restrictions apply for Intermediate SQL:
None.
2) The following restrictions apply for Entry SQL in addition to any Intermediate SQL restrictions:
a) Conforming Entry SQL language shall not contain a <drop view statement>.
您可以查看wiki article . At the bottom, in the "External Links" you can find The SQL-92 standard。向下滚动到“X3H2-92-154/DBL CBR-002, 11.20 ”,您可以在那里找到:
<drop view statement> ::=
DROP VIEW <table name> <drop behavior>
Note: If CASCADE is specified, then any such dependent object
will be dropped by the execution of the <revoke statement> spec-
ified in the General Rules of this Subclause.
在 ANSI-92 标准中,RESTRICT
和 CASCADE
都在 11.20
<drop behavior>
限定词提及
If RESTRICT is specified, then V shall not be referenced in the of any view descriptor or the of any assertion descriptor or constraint descriptor
Note: If CASCADE is specified, then any such dependent object will be dropped by the execution of the spec- ified in the General Rules of this Subclause.
在此处搜索 <drop behavior>
,第 6 次出现浏览量
https://www.contrib.andrew.cmu.edu/~shadow/sql/sql1992.txt