- 博客(146)
- 收藏
- 关注
翻译 MySQL 8.0-13.2.11.9 Lateral Derived Tables(横向派生表)
A derived table cannot normally refer to (depend on) columns of preceding tables in the sameFROMclause. As of MySQL 8.0.14, a derived table may be defined as a lateral derived table to specify that such references are permitted.派生表通常不能在同一个FROM子句中引用(依赖于..
2021-11-09 14:41:53 524
翻译 MySQL 8.0-13.2.11.8 Derived Tables
This section discusses general characteristics of derived tables. For information about lateral derived tables preceded by theLATERALkeyword, seeSection13.2.11.9, “Lateral Derived Tables”.本节讨论派生表的一般特征。有关以lateral关键字开头的横向派生表的信息,请参见第13.2.11.9节“横向派生表”。...
2021-11-09 14:31:59 267
翻译 MySQL 8.0-13.2.11.7 Correlated Subqueries(关联子查询)
Acorrelated subqueryis a subquery that contains a reference to a table that also appears in the outer query. For example:相关子查询是一个子查询,它包含对同样出现在外部查询中的表的引用。例如:SELECT * FROM t1 WHERE column1 = ANY (SELECT column1 FROM t2 WHERE t..
2021-11-09 11:33:17 1213
翻译 MySQL 8.0-13.2.11.6 Subqueries with EXISTS or NOT EXISTS
If a subquery returns any rows at all,EXISTSsubqueryisTRUE, andNOT EXISTSsubqueryisFALSE. For example:如果子查询返回任何行,则EXISTS子查询为TRUE, NOT EXISTS子查询为FALSE。例如:SELECT column1 FROM t1 WHERE EXISTS (SELECT * FROM t2);Traditionally, anEXISTSsubquery...
2021-11-09 11:14:37 151
翻译 MySQL 8.0-13.2.11.5 Row Subqueries
Scalar or column subqueries return a single value or a column of values. Arow subqueryis a subquery variant that returns a single row and can thus return more than one column value. Legal operators for row subquery comparisons are:标量或列子查询返回单个值或一列值。行子查询..
2021-11-09 11:05:11 80
翻译 MySQL 8.0-13.2.11.4 Subqueries with ALL
yntax:operand comparison_operator ALL (subquery)The wordALL, which must follow a comparison operator, means“returnTRUEif the comparison isTRUEforALLof the values in the column that the subquery returns.”For example:单词ALL必须跟在比较运算符后面,意思是“如果子查...
2021-11-09 10:54:43 50
翻译 MySQL 8.0-13.2.11.3 Subqueries with ANY, IN, or SOME
Syntax:operand comparison_operator ANY (subquery)operand IN (subquery)operand comparison_operator SOME (subquery)Wherecomparison_operatoris one of these operators:= > < >= <= <> !=TheANYkeyword, which must follow a c...
2021-11-09 10:31:00 76
翻译 MySQL 8.0-13.2.11.2 Comparisons Using Subqueries(比较使用子查询)
The most common use of a subquery is in the form:子查询最常见的用法是:non_subquery_operand comparison_operator (subquery)Wherecomparison_operatoris one of these operators:其中comparison_operator是以下操作符之一:= > < >= <= <> != <=>...
2021-11-09 10:20:04 108
翻译 MySQL 8.0-13.2.11.1 The Subquery as Scalar Operand(子查询作为标量操作数)
In its simplest form, a subquery is a scalar subquery that returns a single value. A scalar subquery is a simple operand, and you can use it almost anywhere a single column value or literal is legal, and you can expect it to have those characteristics that
2021-11-09 10:13:37 149
翻译 MySQL 8.0-13.2.11 Subqueries
13.2.11.1 The Subquery as Scalar Operand13.2.11.2 Comparisons Using Subqueries13.2.11.3 Subqueries with ANY, IN, or SOME13.2.11.4 Subqueries with ALL13.2.11.5 Row Subqueries13.2.11.6 Subqueries with EXISTS or NOT EXISTS13.2.11.7 Correlated Subq
2021-11-09 09:52:06 217
翻译 MySQL 8.0-13.2.10.4 Parenthesized Query Expressions
parenthesized_query_expression: ( query_expression [order_by_clause] [limit_clause] ) [order_by_clause] [limit_clause] [into_clause]query_expression: query_block [UNION query_block [UNION query_block ...]] [order_by_claus.
2021-11-08 17:52:38 134
翻译 MySQL 8.0-13.2.10.3 UNION Clause
SELECT ...UNION [ALL | DISTINCT] SELECT ...[UNION [ALL | DISTINCT] SELECT ...]UNION combines the result from multipleSELECTstatements into a single result set. Example:UNION将多个SELECT语句的结果组合为一个结果集。例子:mysql> SELECT 1, 2;+---+---+| 1 | 2 |+-...
2021-11-08 17:45:10 184
翻译 MySQL 8.0-13.2.10.2 JOIN Clause
MySQL supports the followingJOINsyntax for thetable_referencespart ofSELECTstatements and multiple-tableDELETEandUPDATEstatements:对于SELECT语句和多表DELETE和UPDATE语句的table_references部分,MySQL支持以下JOIN语法:table_references: escaped_table_reference [...
2021-11-08 16:51:38 200
翻译 MySQL 8.0-13.2.10.1 SELECT ... INTO Statement
TheSELECT ... INTOform ofSELECTenables a query result to be stored in variables or written to a file:SELECT ……INTO SELECT的形式允许查询结果存储在变量中或写入文件: SELECT ... INTOvar_listselects column values and stores them into variables. SELECT ……INTO var_li...
2021-11-08 15:55:11 330
翻译 MySQL 8.0-13.2.10 SELECT Statement
13.2.10.1 SELECT ... INTO Statement13.2.10.2 JOIN Clause13.2.10.3 UNION Clause13.2.10.4 Parenthesized Query Expressions SELECT [ALL | DISTINCT | DISTINCTROW ] [HIGH_PRIORITY] [STRAIGHT_JOIN] [SQL_SMALL_RESULT] [SQL_BIG_RESULT] [S
2021-11-08 15:39:01 351
翻译 MySQL 8.0-13.2.9 REPLACE Statement
REPLACE [LOW_PRIORITY | DELAYED] [INTO] tbl_name [PARTITION (partition_name [, partition_name] ...)] [(col_name [, col_name] ...)] { {VALUES | VALUE} (value_list) [, (value_list)] ... | VALUES row_constructor_list }REPLAC.
2021-11-08 10:42:30 138
翻译 MySQL 8.0-13.2.6.3 INSERT DELAYED Statement
INSERT DELAYED ...TheDELAYEDoption for theINSERTstatement is a MySQL extension to standard SQL. In previous versions of MySQL, it can be used for certain kinds of tables (such asMyISAM), such that when a client usesINSERT DELAYED, it gets an okay ...
2021-11-08 10:23:07 106
翻译 MySQL 8.0-13.2.6.2 INSERT ... ON DUPLICATE KEY UPDATE Statement
If you specify anON DUPLICATE KEY UPDATEclause and a row to be inserted would cause a duplicate value in aUNIQUEindex orPRIMARY KEY, anUPDATEof the old row occurs. For example, if columnais declared asUNIQUEand contains the value1, the followin...
2021-11-08 10:21:02 805
翻译 MySQL 8.0-13.2.6.1 INSERT ... SELECT Statement
INSERT [LOW_PRIORITY | HIGH_PRIORITY] [IGNORE] [INTO] tbl_name [PARTITION (partition_name [, partition_name] ...)] [(col_name [, col_name] ...)] {SELECT ... | TABLE table_name} [ON DUPLICATE KEY UPDATE assignment_list]value: {exp.
2021-11-08 10:04:42 186
翻译 MySQL 8.0-13.2.6 INSERT Statement
13.2.6.1 INSERT ... SELECT Statement13.2.6.2 INSERT ... ON DUPLICATE KEY UPDATE Statement13.2.6.3 INSERT DELAYED StatementINSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE] [INTO] tbl_name [PARTITION (partition_name [, partition_name
2021-11-05 17:27:17 386
翻译 MySQL 8.0-13.2.4 HANDLER Statement
HANDLER tbl_name OPEN [ [AS] alias]HANDLER tbl_name READ index_name { = | <= | >= | < | > } (value1,value2,...) [ WHERE where_condition ] [LIMIT ... ]HANDLER tbl_name READ index_name { FIRST | NEXT | PREV | LAST } [ WHERE where_cond.
2021-11-05 15:45:33 89
翻译 MySQL 8.0-13.2.3 DO Statement
DO expr [, expr] ...DOexecutes the expressions but does not return any results. In most respects,DOis shorthand forSELECTexpr, ..., but has the advantage that it is slightly faster when you do not care about the result.DO执行表达式,但不返回任何结果。在大多数情况下,DO...
2021-11-05 15:23:16 129
翻译 MySQL 8.0-13.2.2 DELETE Statement
DELETE is a DML statement that removes rows from a table.DELETE是一个DML语句,用于从表中删除行。ADELETEstatement can start with aWITHclause to define common table expressions accessible within theDELETE. SeeSection13.2.15, “WITH (Common Table Expressions)”.D...
2021-11-05 15:03:57 207
翻译 MySQL 8.0-13.2.1 CALL Statement
CALL sp_name([parameter[,...]])CALL sp_name[()]TheCALLstatement invokes a stored procedure that was defined previously withCREATE PROCEDURE.CALL语句调用前面用CREATE procedure定义的存储过程。Stored procedures that take no arguments can be invoked without pa...
2021-11-05 14:01:49 67
翻译 MySQL 8.0-13.1.37 TRUNCATE TABLE Statement
TRUNCATE [TABLE] tbl_nameTRUNCATE TABLEempties a table completely. It requires theDROPprivilege. Logically,TRUNCATE TABLEis similar to aDELETEstatement that deletes all rows, or a sequence ofDROP TABLEandCREATE TABLEstatements.TRUNCATE TABL...
2021-11-05 11:39:20 235
翻译 MySQL 8.0-13.1.18 CREATE SERVER Statement
CREATE SERVER server_name FOREIGN DATA WRAPPER wrapper_name OPTIONS (option [, option] ...)option: { HOST character-literal | DATABASE character-literal | USER character-literal | PASSWORD character-literal | SOCKET character-literal.
2021-11-05 11:26:50 291
翻译 MySQL 8.0-13.1.13 CREATE EVENT Statement
CREATE [DEFINER = user] EVENT [IF NOT EXISTS] event_name ON SCHEDULE schedule [ON COMPLETION [NOT] PRESERVE] [ENABLE | DISABLE | DISABLE ON SLAVE] [COMMENT 'string'] DO event_body;schedule: { AT timestamp [+ INTER.
2021-11-05 11:00:20 138
翻译 MySQL 8.0-13.1.12 CREATE DATABASE Statement
CREATE {DATABASE | SCHEMA} [IF NOT EXISTS] db_name [create_option] ...create_option: [DEFAULT] { CHARACTER SET [=] charset_name | COLLATE [=] collation_name | ENCRYPTION [=] {'Y' | 'N'}}CREATE_DATEBASE creates a database with the given na.
2021-11-04 17:26:18 139
翻译 MySQL 8.0-CREATE PROCEDURE and CREATE FUNCTION Statements
CREATE [DEFINER = user] PROCEDURE sp_name ([proc_parameter[,...]]) [characteristic ...] routine_bodyCREATE [DEFINER = user] FUNCTION sp_name ([func_parameter[,...]]) RETURNS type [characteristic ...] routine_bodyproc_parame.
2021-11-04 17:09:23 409
翻译 MySQL 8.0-13.1.9 ALTER TABLE Statement
ALTER TABLE tbl_name [alter_option [, alter_option] ...] [partition_options]alter_option: { table_options | ADD [COLUMN] col_name column_definition [FIRST | AFTER col_name] | ADD [COLUMN] (col_name column_definition,...) | ADD .
2021-11-04 15:52:26 328
翻译 MySQL 8.0-13.1.8 ALTER SERVER Statement
ALTER SERVER server_name OPTIONS (option [, option] ...)Alters the server information forserver_name, adjusting any of the options permitted in theCREATE SERVERstatement. The corresponding fields in themysql.serverstable are updated accordingl...
2021-11-04 14:31:34 123
翻译 MySQL 8.0-13.1.7 ALTER PROCEDURE Statement
ALTER PROCEDURE proc_name [characteristic ...]characteristic: { COMMENT 'string' | LANGUAGE SQL | { CONTAINS SQL | NO SQL | READS SQL DATA | MODIFIES SQL DATA } | SQL SECURITY { DEFINER | INVOKER }}This statement can be used to change the c.
2021-11-04 14:23:46 158
翻译 MySQL 8.0-13.1.6 ALTER LOGFILE GROUP Statement
ALTER LOGFILE GROUP logfile_group ADD UNDOFILE 'file_name' [INITIAL_SIZE [=] size] [WAIT] ENGINE [=] engine_nameThis statement adds anUNDOfile named 'file_name' to an existing log file grouplogfile_group. AnALTER LOGFILE GROUPstatem...
2021-11-04 14:10:00 132
翻译 MySQL 8.0-13.1.5 ALTER INSTANCE Statement
ALTER INSTANCE instance_actioninstance_action: { | {ENABLE|DISABLE} INNODB REDO_LOG | ROTATE INNODB MASTER KEY | ROTATE BINLOG MASTER KEY | RELOAD TLS [FOR CHANNEL {mysql_main | mysql_admin}] [NO ROLLBACK ON ERROR] | RELOAD KEYRING.
2021-11-04 14:02:21 253
翻译 MySQL 8.0-13.1.4 ALTER FUNCTION Statement
ALTER FUNCTION func_name [characteristic ...]characteristic: { COMMENT 'string' | LANGUAGE SQL | { CONTAINS SQL | NO SQL | READS SQL DATA | MODIFIES SQL DATA } | SQL SECURITY { DEFINER | INVOKER }}This statement can be used to change the ch.
2021-11-04 11:29:34 201
翻译 MySQL 8.0-13.1.3 ALTER EVENT Statement
ALTER [DEFINER = user] EVENT event_name [ON SCHEDULE schedule] [ON COMPLETION [NOT] PRESERVE] [RENAME TO new_event_name] [ENABLE | DISABLE | DISABLE ON SLAVE] [COMMENT 'string'] [DO event_body]TheALTER EVENTstatement ch...
2021-11-04 11:26:59 85
翻译 MySQL 8.0-13.1.2 ALTER DATABASE Statement
ALTER {DATABASE | SCHEMA} [db_name] alter_option ...alter_option: { [DEFAULT] CHARACTER SET [=] charset_name | [DEFAULT] COLLATE [=] collation_name | [DEFAULT] ENCRYPTION [=] {'Y' | 'N'} | READ ONLY [=] {DEFAULT | 0 | 1}}ALTER DATABASE..
2021-11-04 11:08:37 238
翻译 MySQL 8.0-13.1.1 Atomic Data Definition Statement Support(支持原子数据定义语句)
The following table lists each built-in (native) function and operator and provides a short description of each one. For a table listing functions that are loadable at runtime, seeSection12.2, “Loadable Function Reference”.下表列出了每个内置(本机)函数和操作符,并提供了对它们的简..
2021-11-03 17:55:01 197
翻译 MySQL 8.0-Chapter 12 Functions and Operators
Expressions can be used at several points inSQLstatements, such as in theORDER BYorHAVINGclauses ofSELECTstatements, in theWHEREclause of aSELECT,DELETE, orUPDATEstatement, or inSETstatements. Expressions can be written using values from se...
2021-11-03 13:55:17 93
翻译 MySQL 8.0-11.8 Choosing the Right Type for a Column
For optimum storage, you should try to use the most precise type in all cases. For example, if an integer column is used for values in the range from1to99999,MEDIUMINT UNSIGNEDis the best type. Of the types that represent all the required values, this...
2021-11-03 13:45:34 86
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人