MySQL开发者SQL权威指南-附录(8)
时间:2025-07-07
时间:2025-07-07
MySQL开发者SQL权威指南的附录文档
Create Table语句
<create table statement> ::=
CREATE [ TEMPORARY ] TABLE [ IF NOT EXISTS ]
<table specification><table structure>
[ <table option>... ]
Create Trigger语句
<create trigger statement> ::=
CREATE[ <definer option> ]
TRIGGER <trigger name><trigger moment><trigger event><trigger action><trigger moment> ::= BEFORE | AFTER<trigger event> ::=
{ INSERT | DELETE | UPDATE }
ON <table specification>FOR EACH ROW<trigger action> ::= <sql statement>
Create User语句
<create user statement> ::=
CREATE USER<user specification>
[ , <user specification> ]...
<user specification> ::=
<user name> [ IDENTIFIED BY [ PASSWORD ]<password> ]
Create View语句
<create view statement> ::=
CREATE [ OR REPLACE ]
[ <definer option> ]
[ <sql security option> ]
[ ALGORITHM = { MERGE | TEMPTABLE UNDEFINED } ]
VIEW <view name> [ <column list> ] AS<table expression>[ WITH [ CASCADED | LOCAL ] CHECK OPTION ]
Deallocate Prepare语句
<deallocate prepare statement> ::=
{ DEALLOCATE | DROP } PREPARE <statement name>
Declare Condition语句
<declare condition statement> ::=
MySQL开发者SQL权威指南的附录文档
608附录
DECLARE <condition name> CONDITION FOR
{ SQLSTATE [ VALUE ] <sqlstate value> } |<mysql error code>
Declare Cursor语句
<declare cursor statement> ::=
DECLARE<cursor name> CURSOR FOR <table expression>
Declare Handler语句
<declare handler statement> ::=
DECLARE <handler type> HANDLER FOR <condition value list>
<procedural statement><handler type> ::=
CONTINUE |EXIT |UNDO
<condition value list> ::=
<condition value> [ , <condition value> ]...<condition value> ::=
SQLSTATE [ VALUE ] <sqlstate value> |<mysql error code> |SQLWARNING |NOT FOUND |SQLEXCEPTION |<condition name>
Declare Variable语句
<declare variable statement> ::=
DECLARE <variable list> <data type>
[ DEFAULT <scalar expression> ]
Delete语句
为了避免不必要的重复定义,这里给出DELETE语句的两个定义。第一个定义从一个表中删除行;第二个定义同时从多个表中删除行。
<delete statement> ::=
DELETE [ IGNORE ]
FROM <table reference>[ <where clause> ][ <order by clause> ][ <limit clause> ]
<delete statement> ::=
{ DELETE [ LOW_PRIORITY ] [ IGNORE ]
<table reference> [ , <table reference> ]...
FROM <table reference> [ , <table reference >]...
…… 此处隐藏:11字,全部文档内容请下载后查看。喜欢就下载吧 ……上一篇:农光互补项目简介与发展前景