12.1 Built-In Function and Operator Reference内置函数和运算符参考

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, see Section 12.2, “Loadable Function Reference”.有关在运行时可加载的函数列表,请参阅第12.2节,“可加载函数参考”

Table 12.1 Built-In Functions and Operators内置函数和运算符

Name名称Description说明Introduced引入版本Deprecated退出版本
&Bitwise AND按位与
>Greater than operator大于运算符
>>Right shift右移
>=Greater than or equal operator大于等于运算符
<Less than operator小于运算符
<>, !=Not equal operator不等运算符
<<Left shift左移
<=Less than or equal operator小于等于运算符
<=>NULL-safe equal to operator空安全等于运算符
%, MODModulo operator取模运算符
*Multiplication operator乘法运算符
+Addition operator加法运算符
-Minus operator减法运算符
-Change the sign of the argument改变参数的符号
->Return value from JSON column after evaluating path; equivalent to JSON_EXTRACT().计算路径后从JSON列返回值;相当于JSON_EXTRACT()
->>Return value from JSON column after evaluating path and unquoting the result; equivalent to JSON_UNQUOTE(JSON_EXTRACT()).计算路径并取消引用结果后返回JSON列的值;相当于JSON_UNQUOTE(JSON_EXTRACT())
/Division operator除法运算符
:=Assign a value赋值
=Assign a value (as part of a SETstatement, or as part of the SETclause in an UPDATEstatement)赋值(作为SET语句的一部分,或作为UPDATE语句中SET子句的一部分)
=Equal operator相等运算符
^Bitwise XOR按位异或
ABS()Return the absolute value返回绝对值
ACOS()Return the arc cosine返回弧余弦
ADDDATE()Add time values (intervals) to a date value将时间值(间隔)添加到日期值
ADDTIME()Add time增加时间
AES_DECRYPT()Decrypt using AES使用AES解密
AES_ENCRYPT()Encrypt using AES使用AES加密
AND, &&Logical AND逻辑与
ANY_VALUE()Suppress ONLY_FULL_GROUP_BY value rejection抑制ONLY_FULL_GROUP_BY值被拒绝
ASCII()Return numeric value of left-most character返回最左边字符的数值
ASIN()Return the arc sine返回弧正弦
ATAN()Return the arc tangent返回反正切
ATAN2(), ATAN()Return the arc tangent of the two arguments返回两个参数的反正切值
AVG()Return the average value of the argument返回参数的平均值
BENCHMARK()Repeatedly execute an expression重复执行表达式
BETWEEN ... AND ...Whether a value is within a range of values值是否在值的范围内
BIN()Return a string containing binary representation of a number返回包含数字二进制表示形式的字符串
BIN_TO_UUID()Convert binary UUID to string将二进制UUID转换为字符串
BINARYCast a string to a binary string将字符串转换为二进制字符串
BIT_AND()Return bitwise AND返回按位与
BIT_COUNT()Return the number of bits that are set返回设置的位数
BIT_LENGTH()Return length of argument in bits返回以位为单位的参数长度
BIT_OR()Return bitwise OR返回按位或
BIT_XOR()Return bitwise XOR返回按位异或
CAN_ACCESS_COLUMN()Internal use only仅供内部使用
CAN_ACCESS_DATABASE()Internal use only仅供内部使用
CAN_ACCESS_TABLE()Internal use only仅供内部使用
CAN_ACCESS_USER()Internal use only仅供内部使用8.0.22
CAN_ACCESS_VIEW()Internal use only仅供内部使用
CASECase operator情形运算符
CAST()Cast a value as a certain type将值强制转换为特定类型
CEIL()Return the smallest integer value not less than the argument返回不小于参数的最小整数值
CEILING()Return the smallest integer value not less than the argument返回不小于参数的最小整数值
CHAR()Return the character for each integer passed返回传递的每个整数的字符
CHAR_LENGTH()Return number of characters in argument返回参数中的字符数
CHARACTER_LENGTH()Synonym for CHAR_LENGTH()CHAR_LENGTH()的同义词
CHARSET()Return the character set of the argument返回参数的字符集
COALESCE()Return the first non-NULL argument返回第一个非空参数
COERCIBILITY()Return the collation coercibility value of the string argument返回字符串参数的排序规则强制值
COLLATION()Return the collation of the string argument返回字符串参数的排序规则
COMPRESS()Return result as a binary string以二进制字符串形式返回结果
CONCAT()Return concatenated string返回串联字符串
CONCAT_WS()Return concatenate with separator返回带分隔符的串联
CONNECTION_ID()Return the connection ID (thread ID) for the connection返回连接的连接ID(线程ID)
CONV()Convert numbers between different number bases在不同的基数之间转换数字
CONVERT()Cast a value as a certain type将值强制转换为特定类型
CONVERT_TZ()Convert from one time zone to another从一个时区转换到另一个时区
COS()Return the cosine返回余弦
COT()Return the cotangent返回余切
COUNT()Return a count of the number of rows returned返回返回的行数的计数
COUNT(DISTINCT)Return the count of a number of different values返回多个不同值的计数
CRC32()Compute a cyclic redundancy check value计算循环冗余校验值
CUME_DIST()Cumulative distribution value累积分布值
CURDATE()Return the current date返回当前日期
CURRENT_DATE(), CURRENT_DATESynonyms for CURDATE()CURDATE()的同义词
CURRENT_ROLE()Return the current active roles返回当前活动角色
CURRENT_TIME(), CURRENT_TIMESynonyms for CURTIME()CURTIME()的同义词
CURRENT_TIMESTAMP(), CURRENT_TIMESTAMPSynonyms for NOW()NOW()的同义词
CURRENT_USER(), CURRENT_USERThe authenticated user name and host name经过身份验证的用户名和主机名
CURTIME()Return the current time返回当前时间
DATABASE()Return the default (current) database name返回默认(当前)数据库名称
DATE()Extract the date part of a date or datetime expression提取日期或日期时间表达式的日期部分
DATE_ADD()Add time values (intervals) to a date value将时间值(间隔)添加到日期值
DATE_FORMAT()Format date as specified按规定设置日期格式
DATE_SUB()Subtract a time value (interval) from a date从日期中减去时间值(间隔)
DATEDIFF()Subtract two dates两个日期相减
DAY()Synonym for DAYOFMONTH()DAYOFMONTH()的同义词
DAYNAME()Return the name of the weekday返回工作日的名称
DAYOFMONTH()Return the day of the month (0-31)返回一月中的某一天(0-31)
DAYOFWEEK()Return the weekday index of the argument返回参数的工作日索引
DAYOFYEAR()Return the day of the year (1-366)返回一年中的某一天(1-366)
DEFAULT()Return the default value for a table column返回表列的默认值
DEGREES()Convert radians to degrees将弧度转换为度
DENSE_RANK()Rank of current row within its partition, without gaps当前行在其分区内的秩,没有间隙
DIVInteger division整数除法
ELT()Return string at index number返回索引号处的字符串
EXP()Raise to the power of求自然对数的底数的乘方
EXPORT_SET()Return a string such that for every bit set in the value bits, you get an on string and for every unset bit, you get an off string返回一个字符串,这样对于在值位中设置的每一位,您得到一个on字符串,对于每一个未设置的位,您得到一个off字符串
EXTRACT()Extract part of a date提取日期的一部分
ExtractValue()Extract a value from an XML string using XPath notation使用XPath表示法从XML字符串中提取值
FIELD()Index (position) of first argument in subsequent arguments后继参数中第一个参数的索引(位置)
FIND_IN_SET()Index (position) of first argument within second argument第一个参数在第二个参数中的索引(位置)
FIRST_VALUE()Value of argument from first row of window frame来自窗口框架第一行的参数值
FLOOR()Return the largest integer value not greater than the argument返回不大于参数的最大整数值
FORMAT()Return a number formatted to specified number of decimal places返回格式化为指定小数位数的数字
FORMAT_BYTES()Convert byte count to value with units将字节计数转换为带单位的值8.0.16
FORMAT_PICO_TIME()Convert time in picoseconds to value with units将时间(皮秒)转换为单位值8.0.16
FOUND_ROWS()For a SELECT with a LIMIT clause, the number of rows that would be returned were there no LIMIT clause对于带有LIMIT子句的SELECT,如果没有LIMIT子句,则返回的行数
FROM_BASE64()Decode base64 encoded string and return result解码base64编码字符串并返回结果
FROM_DAYS()Convert a day number to a date将日数转换为日期
FROM_UNIXTIME()Format Unix timestamp as a date将Unix时间戳格式化为日期
GeomCollection()Construct geometry collection from geometries从几何图形构造几何图形集合
GeometryCollection()Construct geometry collection from geometries从几何图形构造几何图形集合
GET_DD_COLUMN_PRIVILEGES()Internal use only仅供内部使用
GET_DD_CREATE_OPTIONS()Internal use only仅供内部使用
GET_DD_INDEX_SUB_PART_LENGTH()Internal use only仅供内部使用
GET_FORMAT()Return a date format string返回日期格式字符串
GET_LOCK()Get a named lock获取命名锁
GREATEST()Return the largest argument返回最大参数
GROUP_CONCAT()Return a concatenated string返回串联字符串
GROUPING()Distinguish super-aggregate ROLLUP rows from regular rows区分超级聚合汇总行和常规行
GTID_SUBSET()Return true if all GTIDs in subset are also in set; otherwise false.如果子集中的所有gtid也在集合中,则返回true;否则为false
GTID_SUBTRACT()Return all GTIDs in set that are not in subset.返回集合中所有不在子集中的gtid。
HEX()Hexadecimal representation of decimal or string value十进制或字符串值的十六进制表示法
HOUR()Extract the hour提取时间
ICU_VERSION()ICU library versionICU库版本
IF()If/else constructIf/else构造
IFNULL()Null if/else constructNull if/else构造
IN()Whether a value is within a set of values值是否在一组值内
INET_ATON()Return the numeric value of an IP address返回IP地址的数值
INET_NTOA()Return the IP address from a numeric value从数字值返回IP地址
INET6_ATON()Return the numeric value of an IPv6 address返回IPv6地址的数值
INET6_NTOA()Return the IPv6 address from a numeric value从数字值返回IPv6地址
INSERT()Insert substring at specified position up to specified number of characters在指定位置插入子字符串,最多可插入指定的字符数
INSTR()Return the index of the first occurrence of substring返回子字符串第一次出现的索引
INTERNAL_AUTO_INCREMENT()Internal use only仅供内部使用
INTERNAL_AVG_ROW_LENGTH()Internal use only仅供内部使用
INTERNAL_CHECK_TIME()Internal use only仅供内部使用
INTERNAL_CHECKSUM()Internal use only仅供内部使用
INTERNAL_DATA_FREE()Internal use only仅供内部使用
INTERNAL_DATA_LENGTH()Internal use only仅供内部使用
INTERNAL_DD_CHAR_LENGTH()Internal use only仅供内部使用
INTERNAL_GET_COMMENT_OR_ERROR()Internal use only仅供内部使用
INTERNAL_GET_ENABLED_ROLE_JSON()Internal use only仅供内部使用8.0.19
INTERNAL_GET_HOSTNAME()Internal use only仅供内部使用8.0.19
INTERNAL_GET_USERNAME()Internal use only仅供内部使用8.0.19
INTERNAL_GET_VIEW_WARNING_OR_ERROR()Internal use only仅供内部使用
INTERNAL_INDEX_COLUMN_CARDINALITY()Internal use only仅供内部使用
INTERNAL_INDEX_LENGTH()Internal use only仅供内部使用
INTERNAL_IS_ENABLED_ROLE()Internal use only仅供内部使用8.0.19
INTERNAL_IS_MANDATORY_ROLE()Internal use only仅供内部使用8.0.19
INTERNAL_KEYS_DISABLED()Internal use only仅供内部使用
INTERNAL_MAX_DATA_LENGTH()Internal use only仅供内部使用
INTERNAL_TABLE_ROWS()Internal use only仅供内部使用
INTERNAL_UPDATE_TIME()Internal use only仅供内部使用
INTERVAL()Return the index of the argument that is less than the first argument返回小于第一个参数的参数索引
ISTest a value against a boolean根据布尔值测试值
IS_FREE_LOCK()Whether the named lock is free命名锁是否可用
IS_IPV4()Whether argument is an IPv4 address参数是否为IPv4地址
IS_IPV4_COMPAT()Whether argument is an IPv4-compatible address参数是否为IPv4兼容地址
IS_IPV4_MAPPED()Whether argument is an IPv4-mapped address参数是否为IPv4映射地址
IS_IPV6()Whether argument is an IPv6 address参数是否为IPv6地址
IS NOTTest a value against a boolean根据布尔值测试值
IS NOT NULLNOT NULL value testNOT NULL值测试
IS NULLNULL value testNULL值测试
IS_USED_LOCK()Whether the named lock is in use; return connection identifier if true命名锁是否在使用中;返回连接标识符(如果为true
IS_UUID()Whether argument is a valid UUID参数是否为有效的UUID
ISNULL()Test whether the argument is NULL测试参数是否为NULL
JSON_ARRAY()Create JSON array创建JSON数组
JSON_ARRAY_APPEND()Append data to JSON document将数据附加到JSON文档
JSON_ARRAY_INSERT()Insert into JSON array插入JSON数组
JSON_ARRAYAGG()Return result set as a single JSON array将结果集作为单个JSON数组返回
JSON_CONTAINS()Whether JSON document contains specific object at pathJSON文档是否在路径处包含特定对象
JSON_CONTAINS_PATH()Whether JSON document contains any data at pathJSON文档是否在路径中包含任何数据
JSON_DEPTH()Maximum depth of JSON documentJSON文档的最大深度
JSON_EXTRACT()Return data from JSON document从JSON文档返回数据
JSON_INSERT()Insert data into JSON document将数据插入JSON文档
JSON_KEYS()Array of keys from JSON documentJSON文档中的键数组
JSON_LENGTH()Number of elements in JSON documentJSON文档中的元素数
JSON_MERGE()Merge JSON documents, preserving duplicate keys. 合并JSON文档,保留重复的键。Deprecated synonym for JSON_MERGE_PRESERVE()不推荐使用的JSON_MERGE_PRESERVE()同义词Yes
JSON_MERGE_PATCH()Merge JSON documents, replacing values of duplicate keys合并JSON文档,替换重复键的值
JSON_MERGE_PRESERVE()Merge JSON documents, preserving duplicate keys合并JSON文档,保留重复键
JSON_OBJECT()Create JSON object创建JSON对象
JSON_OBJECTAGG()Return result set as a single JSON object作为单个JSON对象返回结果集
JSON_OVERLAPS()Compares two JSON documents, returns TRUE (1) if these have any key-value pairs or array elements in common, otherwise FALSE (0)比较两个JSON文档,如果它们有任何共同的键值对或数组元素,则返回TRUE(1),否则返回FALSE(0)8.0.17
JSON_PRETTY()Print a JSON document in human-readable format以人类可读格式打印JSON文档
JSON_QUOTE()Quote JSON document给JSON文档加引号
JSON_REMOVE()Remove data from JSON document从JSON文档中删除数据
JSON_REPLACE()Replace values in JSON document替换JSON文档中的值
JSON_SCHEMA_VALID()Validate JSON document against JSON schema; returns TRUE/1 if document validates against schema, or FALSE/0 if it does not根据JSON模式验证JSON文档;如果文档根据架构进行验证,则返回TRUE/1,否则返回FALSE/0。8.0.17
JSON_SCHEMA_VALIDATION_REPORT()Validate JSON document against JSON schema; returns report in JSON format on outcome on validation including success or failure and reasons for failure根据JSON模式验证JSON文档;返回JSON格式的验证结果报告,包括成功或失败以及失败的原因8.0.17
JSON_SEARCH()Path to value within JSON documentJSON文档中的值路径
JSON_SET()Insert data into JSON document将数据插入JSON文档
JSON_STORAGE_FREE()Freed space within binary representation of JSON column value following partial update部分更新后JSON列值的二进制表示形式中释放的空间
JSON_STORAGE_SIZE()Space used for storage of binary representation of a JSON document用于存储JSON文档的二进制表示的空间
JSON_TABLE()Return data from a JSON expression as a relational table将JSON表达式中的数据作为关系表返回
JSON_TYPE()Type of JSON valueJSON值的类型
JSON_UNQUOTE()Unquote JSON value取消给JSON值加引号
JSON_VALID()Whether JSON value is validJSON值是否有效
JSON_VALUE()Extract value from JSON document at location pointed to by path provided; return this value as VARCHAR(512) or specified type在提供的路径所指向的位置从JSON文档中提取值;以VARCHAR(512)或指定类型返回此值8.0.21
LAG()Value of argument from row lagging current row within partition来自分区内当前行的参数值
LAST_DAYReturn the last day of the month for the argument返回当月最后一天的参数
LAST_INSERT_ID()Value of the AUTOINCREMENT column for the last INSERT上次插入的自动增量列的值
LAST_VALUE()Value of argument from last row of window frame窗框最后一行的参数值
LCASE()Synonym for LOWER()LOWER()的同义词
LEAD()Value of argument from row leading current row within partition分区内当前行前导行的参数值
LEAST()Return the smallest argument返回最小参数
LEFT()Return the leftmost number of characters as specified返回指定的最左边的字符数
LENGTH()Return the length of a string in bytes返回字符串的字节长度
LIKESimple pattern matching简单模式匹配
LineString()Construct LineString from Point values从点值构造线字符串
LN()Return the natural logarithm of the argument返回参数的自然对数
LOAD_FILE()Load the named file加载命名文件
LOCALTIME(), LOCALTIMESynonym for NOW()NOW()的同义词
LOCALTIMESTAMP, LOCALTIMESTAMP()Synonym for NOW()NOW()的同义词
LOCATE()Return the position of the first occurrence of substring返回子字符串第一次出现的位置
LOG()Return the natural logarithm of the first argument返回第一个参数的自然对数
LOG10()Return the base-10 logarithm of the argument返回参数的以10为底的对数
LOG2()Return the base-2 logarithm of the argument返回参数的以2为底的对数
LOWER()Return the argument in lowercase以小写形式返回参数
LPAD()Return the string argument, left-padded with the specified string返回字符串参数,左填充指定的字符串
LTRIM()Remove leading spaces删除前导空格
MAKE_SET()Return a set of comma-separated strings that have the corresponding bit in bits set返回一组以逗号分隔的字符串,这些字符串的位集中有相应的位
MAKEDATE()Create a date from the year and day of year从一年中的某一天创建一个日期
MAKETIME()Create time from hour, minute, second从小时、分钟、秒创建时间
MASTER_POS_WAIT()Block until the replica has read and applied all updates up to the specified position阻止,直到复制副本读取并应用所有更新到指定位置为止
MATCHPerform full-text search执行全文搜索
MAX()Return the maximum value返回最大值
MBRContains()Whether MBR of one geometry contains MBR of another一个几何体的MBR是否包含另一个几何体的MBR
MBRCoveredBy()Whether one MBR is covered by another一个MBR是否被另一个MBR覆盖
MBRCovers()Whether one MBR covers another一个MBR是否覆盖另一个MBR
MBRDisjoint()Whether MBRs of two geometries are disjoint两种几何形状的mbr是否不相交
MBREquals()Whether MBRs of two geometries are equal两种几何形状的MBR是否相等
MBRIntersects()Whether MBRs of two geometries intersect两种几何形状的MBR是否相交
MBROverlaps()Whether MBRs of two geometries overlap两种几何形状的MBR是否重叠
MBRTouches()Whether MBRs of two geometries touch两种几何形状的MBR是否接触
MBRWithin()Whether MBR of one geometry is within MBR of another一种几何形状的MBR是否在另一种几何形状的MBR内
MD5()Calculate MD5 checksum计算MD5校验和
MEMBER OF()Returns true (1) if first operand matches any element of JSON array passed as second operand, otherwise returns false (0)如果第一个操作数与作为第二个操作数传递的JSON数组的任何元素匹配,则返回true(1),否则返回false(0)8.0.17
MICROSECOND()Return the microseconds from argument返回参数的微秒数
MID()Return a substring starting from the specified position返回从指定位置开始的子字符串
MIN()Return the minimum value返回最小值
MINUTE()Return the minute from the argument返回参数的分钟数
MOD()Return the remainder把剩下的还给我
MONTH()Return the month from the date passed返回从过去日期算起的月份
MONTHNAME()Return the name of the month返回月份名称
MultiLineString()Contruct MultiLineString from LineString values从字符串值构造多重字符串
MultiPoint()Construct MultiPoint from Point values从点值构造多点
MultiPolygon()Construct MultiPolygon from Polygon values从多边形值构造多多边形
NAME_CONST()Cause the column to have the given name使列具有给定的名称
NOT, !Negates value否定值
NOT BETWEEN ... AND ...Whether a value is not within a range of values值是否不在值的范围内
NOT IN()Whether a value is not within a set of values值是否不在一组值内
NOT LIKENegation of simple pattern matching简单模式匹配的否定
NOT REGEXPNegation of REGEXPREGEXP的否定
NOW()Return the current date and time返回当前日期和时间
NTH_VALUE()Value of argument from N-th row of window frame窗口框架的第N行参数值
NTILE()Bucket number of current row within its partition.当前行在其分区内的Bucket编号。
NULLIF()Return NULL if expr1 = expr2如果expr1=expr2,则返回NULL
OCT()Return a string containing octal representation of a number返回包含数字八进制表示的字符串
OCTET_LENGTH()Synonym for LENGTH()LENGTH()的同义词
OR, ||Logical OR逻辑或
ORD()Return character code for leftmost character of the argument返回参数最左边字符的字符代码
PERCENT_RANK()Percentage rank value百分比秩值
PERIOD_ADD()Add a period to a year-month将时段添加到年-月
PERIOD_DIFF()Return the number of months between periods返回时段之间的月数
PI()Return the value of pi返回圆周率的值
Point()Construct Point from coordinates从坐标构造点
Polygon()Construct Polygon from LineString arguments从LineString参数构造多边形
POSITION()Synonym for LOCATE()LOCATE()的同义词
POW()Return the argument raised to the specified power返回参数的指定次方的幂
POWER()Return the argument raised to the specified power返回参数的指定次方的幂
PS_CURRENT_THREAD_ID()Performance Schema thread ID for current thread当前线程的性能架构线程ID8.0.16
PS_THREAD_ID()Performance Schema thread ID for given thread给定线程的性能架构线程ID8.0.16
QUARTER()Return the quarter from a date argument从日期参数返回季度
QUOTE()Escape the argument for use in an SQL statement转义参数以在SQL语句中使用
RADIANS()Return argument converted to radians返回参数转换为弧度的值
RAND()Return a random floating-point value返回随机浮点值
RANDOM_BYTES()Return a random byte vector返回一个随机字节向量
RANK()Rank of current row within its partition, with gaps当前行在其分区内的秩,带间隙
REGEXPWhether string matches regular expression字符串是否匹配正则表达式
REGEXP_INSTR()Starting index of substring matching regular expression子串匹配正则表达式的起始索引
REGEXP_LIKE()Whether string matches regular expression字符串是否匹配正则表达式
REGEXP_REPLACE()Replace substrings matching regular expression替换与正则表达式匹配的子字符串
REGEXP_SUBSTR()Return substring matching regular expression返回子字符串匹配正则表达式
RELEASE_ALL_LOCKS()Release all current named locks释放所有当前命名锁
RELEASE_LOCK()Release the named lock释放命名锁
REPEAT()Repeat a string the specified number of times重复指定次数的字符串
REPLACE()Replace occurrences of a specified string替换指定字符串的出现
REVERSE()Reverse the characters in a string反转字符串中的字符
RIGHT()Return the specified rightmost number of characters返回指定的最右边的字符数
RLIKEWhether string matches regular expression字符串是否匹配正则表达式
ROLES_GRAPHML()Return a GraphML document representing memory role subgraphs返回表示内存角色子图的GraphML文档
ROUND()Round the argument将参数四舍五入
ROW_COUNT()The number of rows updated更新的行数
ROW_NUMBER()Number of current row within its partition分区内当前行数
RPAD()Append string the specified number of times追加指定次数的字符串
RTRIM()Remove trailing spaces删除尾随空格
SCHEMA()Synonym for DATABASE()DATABASE()的同义词
SEC_TO_TIME()Converts seconds to 'hh:mm:ss' format将秒转换为“hh:mm:ss”格式
SECOND()Return the second (0-59)返回第二个(0-59)
SESSION_USER()Synonym for USER()USER()的同义词
SHA1(), SHA()Calculate an SHA-1 160-bit checksum计算SHA-1 160位校验和
SHA2()Calculate an SHA-2 checksum计算SHA-2校验和
SIGN()Return the sign of the argument返回参数的符号
SIN()Return the sine of the argument返回参数的正弦值
SLEEP()Sleep for a number of seconds睡眠几秒钟
SOUNDEX()Return a soundex string返回探测法字符串
SOUNDS LIKECompare sounds比较声音
SPACE()Return a string of the specified number of spaces返回指定空格数的字符串
SQRT()Return the square root of the argument返回参数的平方根
ST_Area()Return Polygon or MultiPolygon area返回多边形或多边形区域
ST_AsBinary(), ST_AsWKB()Convert from internal geometry format to WKB从内部几何图形格式转换为WKB
ST_AsGeoJSON()Generate GeoJSON object from geometry从几何体生成GeoJSON对象
ST_AsText(), ST_AsWKT()Convert from internal geometry format to WKT从内部几何图形格式转换为WKT
ST_Buffer()Return geometry of points within given distance from geometry返回距几何体给定距离内点的几何体
ST_Buffer_Strategy()Produce strategy option for ST_Buffer()生成ST_Buffer()的策略选项
ST_Centroid()Return centroid as a point返回质心作为点
ST_Collect()Aggregate spatial values into collection将空间值聚合到集合中8.0.24
ST_Contains()Whether one geometry contains another一个几何体是否包含另一个几何体
ST_ConvexHull()Return convex hull of geometry返回几何凸包
ST_Crosses()Whether one geometry crosses another一个几何体是否与另一个几何体相交
ST_Difference()Return point set difference of two geometries两种几何的返回点集差
ST_Dimension()Dimension of geometry几何尺寸
ST_Disjoint()Whether one geometry is disjoint from another一个几何体与另一个几何体是否不相交
ST_Distance()The distance of one geometry from another一个几何体与另一个几何体的距离
ST_Distance_Sphere()Minimum distance on earth between two geometries地球上两个几何体之间的最小距离
ST_EndPoint()End Point of LineString线串的终点
ST_Envelope()Return MBR of geometry返回几何体的MBR
ST_Equals()Whether one geometry is equal to another一个几何体是否等于另一个几何体
ST_ExteriorRing()Return exterior ring of Polygon返回多边形外环
ST_FrechetDistance()The discrete Fréchet distance of one geometry from another一个几何体与另一个几何体的离散距离8.0.23
ST_GeoHash()Produce a geohash value生成geohash值
ST_GeomCollFromText(), ST_GeometryCollectionFromText(), ST_GeomCollFromTxt()Return geometry collection from WKT从WKT返回几何体集合
ST_GeomCollFromWKB(), ST_GeometryCollectionFromWKB()Return geometry collection from WKB从WKB返回几何体集合
ST_GeometryN()Return N-th geometry from geometry collection从几何体集合返回第N个几何体
ST_GeometryType()Return name of geometry type返回几何体类型的名称
ST_GeomFromGeoJSON()Generate geometry from GeoJSON object从GeoJSON对象生成几何体
ST_GeomFromText(), ST_GeometryFromText()Return geometry from WKT从WKT返回几何体
ST_GeomFromWKB(), ST_GeometryFromWKB()Return geometry from WKB从WKB返回几何体
ST_HausdorffDistance()The discrete Hausdorff distance of one geometry from another一个几何体与另一个几何体的离散Hausdorff距离8.0.23
ST_InteriorRingN()Return N-th interior ring of Polygon返回多边形的第N个内环
ST_Intersection()Return point set intersection of two geometries返回点集两个几何体的交集
ST_Intersects()Whether one geometry intersects another一个几何体是否与另一个几何体相交
ST_IsClosed()Whether a geometry is closed and simple几何图形是否闭合且简单
ST_IsEmpty()Whether a geometry is empty几何图形是否为空
ST_IsSimple()Whether a geometry is simple几何图形是否简单
ST_IsValid()Whether a geometry is valid几何图形是否有效
ST_LatFromGeoHash()Return latitude from geohash value从geohash值返回纬度
ST_Latitude()Return latitude of Point返回点纬度8.0.12
ST_Length()Return length of LineString返回字符串的长度
ST_LineFromText(), ST_LineStringFromText()Construct LineString from WKT从WKT构造LineString
ST_LineFromWKB(), ST_LineStringFromWKB()Construct LineString from WKB从WKB构造LineString
ST_LineInterpolatePoint()The point a given percentage along a LineString沿一条线的给定百分比的点8.0.24
ST_LineInterpolatePoints()The points a given percentage along a LineString沿线串以给定百分比表示的点8.0.24
ST_LongFromGeoHash()Return longitude from geohash value从geohash值返回经度
ST_Longitude()Return longitude of Point返回点的经度8.0.12
ST_MakeEnvelope()Rectangle around two points围绕两点的矩形
ST_MLineFromText(), ST_MultiLineStringFromText()Construct MultiLineString from WKT从WKT构造多重线
ST_MLineFromWKB(), ST_MultiLineStringFromWKB()Construct MultiLineString from WKB从WKB构造多重线
ST_MPointFromText(), ST_MultiPointFromText()Construct MultiPoint from WKT从WKT构造多点
ST_MPointFromWKB(), ST_MultiPointFromWKB()Construct MultiPoint from WKB从WKB构造多点
ST_MPolyFromText(), ST_MultiPolygonFromText()Construct MultiPolygon from WKT从WKT构造多多边形
ST_MPolyFromWKB(), ST_MultiPolygonFromWKB()Construct MultiPolygon from WKB从WKB构造多多边形
ST_NumGeometries()Return number of geometries in geometry collection返回几何图形集合中的几何图形数
ST_NumInteriorRing(), ST_NumInteriorRings()Return number of interior rings in Polygon返回多边形内环数
ST_NumPoints()Return number of points in LineString返回LineString中的点数
ST_Overlaps()Whether one geometry overlaps another一个几何体是否与另一个几何体重叠
ST_PointAtDistance()The point a given distance along a LineString沿着一条线的给定距离的点8.0.24
ST_PointFromGeoHash()Convert geohash value to POINT value将geohash值转换为POINT值
ST_PointFromText()Construct Point from WKT从WKT构造点
ST_PointFromWKB()Construct Point from WKB从WKB构造点
ST_PointN()Return N-th point from LineString从LineString返回第N个点
ST_PolyFromText(), ST_PolygonFromText()Construct Polygon from WKT从WKT构造多边形
ST_PolyFromWKB(), ST_PolygonFromWKB()Construct Polygon from WKB从WKB构造多边形
ST_Simplify()Return simplified geometry返回简化几何图形
ST_SRID()Return spatial reference system ID for geometry返回几何图形的空间参考系统ID
ST_StartPoint()Start Point of LineString线串的起点
ST_SwapXY()Return argument with X/Y coordinates swapped交换X/Y坐标的返回参数
ST_SymDifference()Return point set symmetric difference of two geometries返回点集两几何对称差
ST_Touches()Whether one geometry touches another一个几何体是否接触另一个几何体
ST_Transform()Transform coordinates of geometry几何变换坐标8.0.13
ST_Union()Return point set union of two geometries返回点集两个几何体的并集
ST_Validate()Return validated geometry返回验证的几何图形
ST_Within()Whether one geometry is within another一个几何体是否在另一个几何体中
ST_X()Return X coordinate of Point返回点的X坐标
ST_Y()Return Y coordinate of Point返回点的Y坐标
STATEMENT_DIGEST()Compute statement digest hash value计算语句摘要哈希值
STATEMENT_DIGEST_TEXT()Compute normalized statement digest计算规范化语句摘要
STD()Return the population standard deviation返回总体标准差
STDDEV()Return the population standard deviation返回总体标准差
STDDEV_POP()Return the population standard deviation返回总体标准差
STDDEV_SAMP()Return the sample standard deviation返回样本标准差
STR_TO_DATE()Convert a string to a date将字符串转换为日期
STRCMP()Compare two strings比较两个字符串
SUBDATE()Synonym for DATE_SUB() when invoked with three arguments当用三个参数调用时,是DATE_SUB()的同义词
SUBSTR()Return the substring as specified按指定返回子字符串
SUBSTRING()Return the substring as specified按指定返回子字符串
SUBSTRING_INDEX()Return a substring from a string before the specified number of occurrences of the delimiter从指定的分隔符出现次数之前的字符串返回子字符串
SUBTIME()Subtract times减去时间
SUM()Return the sum返回总和
SYSDATE()Return the time at which the function executes返回函数执行的时间
SYSTEM_USER()Synonym for USER()USER()的同义词
TAN()Return the tangent of the argument返回参数的正切值
TIME()Extract the time portion of the expression passed提取表达式传递的时间部分
TIME_FORMAT()Format as time格式为时间
TIME_TO_SEC()Return the argument converted to seconds返回转换为秒的参数
TIMEDIFF()Subtract time减去时间
TIMESTAMP()With a single argument, this function returns the date or datetime expression; with two arguments, the sum of the arguments对于单个参数,此函数返回日期或日期时间表达式;对于两个参数,参数之和
TIMESTAMPADD()Add an interval to a datetime expression向日期时间表达式添加间隔
TIMESTAMPDIFF()Subtract an interval from a datetime expression从datetime表达式中减去间隔
TO_BASE64()Return the argument converted to a base-64 string返回转换为base-64字符串的参数
TO_DAYS()Return the date argument converted to days返回转换为天的日期参数
TO_SECONDS()Return the date or datetime argument converted to seconds since Year 0返回从0年起转换为秒的日期或日期时间参数
TRIM()Remove leading and trailing spaces删除前导空格和尾随空格
TRUNCATE()Truncate to specified number of decimal places截断到指定的小数位数
UCASE()Synonym for UPPER()UPPER()的同义词
UNCOMPRESS()Uncompress a string compressed解压压缩的字符串
UNCOMPRESSED_LENGTH()Return the length of a string before compression返回压缩前字符串的长度
UNHEX()Return a string containing hex representation of a number返回包含数字十六进制表示形式的字符串
UNIX_TIMESTAMP()Return a Unix timestamp返回Unix时间戳
UpdateXML()Return replaced XML fragment返回替换的XML片段
UPPER()Convert to uppercase转换为大写
USER()The user name and host name provided by the client客户端提供的用户名和主机名
UTC_DATE()Return the current UTC date返回当前UTC日期
UTC_TIME()Return the current UTC time返回当前UTC时间
UTC_TIMESTAMP()Return the current UTC date and time返回当前UTC日期和时间
UUID()Return a Universal Unique Identifier (UUID)返回通用唯一标识符(UUID)
UUID_SHORT()Return an integer-valued universal identifier返回整数值通用标识符
UUID_TO_BIN()Convert string UUID to binary将字符串UUID转换为二进制
VALIDATE_PASSWORD_STRENGTH()Determine strength of password确定密码强度
VALUES()Define the values to be used during an INSERT定义插入期间要使用的值
VAR_POP()Return the population standard variance返回总体标准方差
VAR_SAMP()Return the sample variance返回样本方差
VARIANCE()Return the population standard variance返回总体标准方差
VERSION()Return a string that indicates the MySQL server version返回指示MySQL服务器版本的字符串
WAIT_FOR_EXECUTED_GTID_SET()Wait until the given GTIDs have executed on the replica.等待给定的GTID在复制副本上执行。
WAIT_UNTIL_SQL_THREAD_AFTER_GTIDS()Use WAIT_FOR_EXECUTED_GTID_SET().使用WAIT_FOR_EXECUTED_GTID_SET()8.0.18
WEEK()Return the week number返回周数
WEEKDAY()Return the weekday index返回工作日索引
WEEKOFYEAR()Return the calendar week of the date (1-53)返回日期的日历周(1-53)
WEIGHT_STRING()Return the weight string for a string返回字符串的权重字符串
XORLogical XOR逻辑异或
YEAR()Return the year返回年份
YEARWEEK()Return the year and week返回年和周
|Bitwise OR按位或
~Bitwise inversion位反转