Mysql8 全部功能函数及操作

Table 12.1 功能 and 操作

名称描述谷歌翻译百度翻译
&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 operatorNULL安全等于运算符等于运算符的空安全
%, 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()。在计算路径后从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())。在计算路径并对结果加引号后从JSON列返回值;相当于JSON_UNQUOTE(JSON_EXTRACT())。
/Division operator部门运营商除法运算符
:=Assign a value赋值赋值
=Assign a value (as part of a SET statement, or as part of the SET clause in an UPDATE statement)分配一个值(作为SET语句的一部分,或者作为UPDATE语句中SET子句的一部分)赋值(作为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解密
AES_ENCRYPT()Encrypt using AES使用AES加密使用AES加密
AND, &&Logical AND逻辑与逻辑与
ANY_VALUE()Suppress ONLY_FULL_GROUP_BY value rejection禁止拒绝ONLY_FULL_GROUP_BY值通过值拒绝仅抑制\u FULL_GROUP_
ASCII()Return numeric value of left-most character返回最左边字符的数值返回最左边字符的数值
ASIN()Return the arc sine返回反正弦返回弧正弦
ASYMMETRIC_DECRYPT()Decrypt ciphertext using private or public key使用私钥或公钥解密密文使用私钥或公钥解密密文
ASYMMETRIC_DERIVE()Derive symmetric key from asymmetric keys从非对称密钥派生对称密钥从非对称密钥派生对称密钥
ASYMMETRIC_ENCRYPT()Encrypt cleartext using private or public key使用私钥或公钥加密明文使用私钥或公钥加密明文
ASYMMETRIC_SIGN()Generate signature from digest从摘要生成签名从摘要生成签名
ASYMMETRIC_VERIFY()Verify that signature matches digest验证签名匹配摘要验证签名是否与摘要匹配
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转换为字符串将二进制UUID转换为字符串
BINARYCast a string to a binary string将字符串转换为二进制字符串将字符串转换为二进制字符串
BIT_AND()Return bitwise AND按位返回AND按位和返回
BIT_COUNT()Return the number of bits that are set返回设置的位数返回设置的位数
BIT_LENGTH()Return length of argument in bits返回参数的长度(以位为单位)返回以位为单位的参数长度
BIT_OR()Return bitwise OR按位返回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_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()的同义词CHAR_LENGTH()的同义词
CHARSET()Return the character set of the argument返回参数的字符集返回参数的字符集
COALESCE()Return the first non-NULL argument返回第一个非NULL参数返回第一个非空参数
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)返回连接的连接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计算循环冗余校验值计算循环冗余校验值
CREATE_ASYMMETRIC_PRIV_KEY()Create private key创建私钥创建私钥
CREATE_ASYMMETRIC_PUB_KEY()Create public key创建公钥创建公钥
CREATE_DH_PARAMETERS()Generate shared DH secret生成共享的DH机密生成共享DH密钥
CREATE_DIGEST()Generate digest from string从字符串生成摘要从字符串生成摘要
CUME_DIST()Cumulative distribution value累积分布值累积分布值
CURDATE()Return the current date返回当前日期返回当前日期
CURRENT_DATE(), CURRENT_DATESynonyms for CURDATE()CURDATE()的同义词CURDATE()的同义词
CURRENT_ROLE()Return the current active roles返回当前的活动角色返回当前活动角色
CURRENT_TIME(), CURRENT_TIMESynonyms for CURTIME()CURTIME()的同义词CURTIME()的同义词
CURRENT_TIMESTAMP(), CURRENT_TIMESTAMPSynonyms for NOW()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()的同义词DAYOFMONTH()的同义词
DAYNAME()Return the name of the weekday返回工作日的名称返回工作日的名称
DAYOFMONTH()Return the day of the month (0-31)返回月份中的一天(0-31)返回月的日期(0-31)
DAYOFWEEK()Return the weekday index of the argument返回参数的工作日索引返回参数的工作日索引
DAYOFYEAR()Return the day of the year (1-366)返回一年中的某天(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字符串中提取值使用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() (introduced 8.0.16)Convert byte count to value with units将字节数转换为单位的值将字节计数转换为带单位的值
FORMAT_PICO_TIME() (introduced 8.0.16)Convert time in picoseconds to value with units将时间以皮秒为单位转换为值将以皮秒为单位的时间转换为带单位的值
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子句,则将返回的行数对于带有LIMIT子句的SELECT,如果没有LIMIT子句,则返回的行数
FROM_BASE64()Decode base64 encoded string and return result解码base64编码的字符串并返回结果解码base64编码的字符串并返回结果
FROM_DAYS()Convert a day number to a date将天数转换为日期将日期转换为日期
FROM_UNIXTIME()Format Unix timestamp as a date将Unix时间戳记格式化为日期将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区分超级汇总的ROLLUP行与常规行区分超级聚合汇总行和常规行
GTID_SUBSET()Return true if all GTIDs in subset are also in set; otherwise false.如果子集中的所有GTID也都已设置,则返回true;否则,返回true。否则为假。如果子集中的所有gtid也在集合中,则返回true;否则返回false。
GTID_SUBTRACT()Return all GTIDs in set that are not in subset.返回集合中所有不在子集中的GTID。返回集合中不在子集中的所有gtid。
HEX()Hexadecimal representation of decimal or string value十进制或字符串值的十六进制表示十进制或字符串值的十六进制表示
HOUR()Extract the hour提取时间抽出时间
ICU_VERSION()ICU library versionICU库版本ICU库版本
IF()If/else construct如果/其他构造If/else构造
IFNULL()Null if/else construct空if / else构造Null if/else构造
IN()Whether a value is within a set of values一个值是否在一组值内一个值是否在一组值内
INET_ATON()Return the numeric value of an IP address返回IP地址的数值返回IP地址的数值
INET_NTOA()Return the IP address from a numeric value从数值返回IP地址从数值返回IP地址
INET6_ATON()Return the numeric value of an IPv6 address返回IPv6地址的数值返回IPv6地址的数值
INET6_NTOA()Return the IPv6 address from a numeric value从数值返回IPv6地址从数值中返回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() (introduced 8.0.19)Internal use only仅供内部使用仅供内部使用
INTERNAL_GET_HOSTNAME() (introduced 8.0.19)Internal use only仅供内部使用仅供内部使用
INTERNAL_GET_USERNAME() (introduced 8.0.19)Internal use only仅供内部使用仅供内部使用
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() (introduced 8.0.19)Internal use only仅供内部使用仅供内部使用
INTERNAL_IS_MANDATORY_ROLE() (introduced 8.0.19)Internal use only仅供内部使用仅供内部使用
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地址参数是否为IPv4地址
IS_IPV4_COMPAT()Whether argument is an IPv4-compatible address参数是否为IPv4兼容地址参数是否为IPv4兼容地址
IS_IPV4_MAPPED()Whether argument is an IPv4-mapped address参数是否为IPv4映射的地址参数是否为IPv4映射地址
IS_IPV6()Whether argument is an IPv6 address参数是否为IPv6地址参数是否为IPv6地址
IS NOTTest a value against a boolean针对布尔值测试值根据布尔值测试值
IS NOT NULLNOT NULL value test非空值测试非空值测试
IS NULLNULL value test空值测试空值测试
IS_USED_LOCK()Whether the named lock is in use; return connection identifier if true是否使用了命名锁;如果为true,则返回连接标识符是否正在使用命名锁;如果为true,则返回连接标识符
IS_UUID()Whether argument is a valid UUID参数是否为有效的UUID参数是否为有效的UUID
ISNULL()Test whether the argument is NULL测试参数是否为NULL测试参数是否为空
JSON_ARRAY()Create JSON array创建JSON数组创建JSON数组
JSON_ARRAY_APPEND()Append data to JSON document将数据附加到JSON文档向JSON文档追加数据
JSON_ARRAY_INSERT()Insert into JSON array插入JSON数组插入JSON数组
JSON_ARRAYAGG()Return result set as a single JSON array将结果集作为单个JSON数组返回将结果集作为单个JSON数组返回
JSON_CONTAINS()Whether JSON document contains specific object at pathJSON文档是否在路径中包含特定对象JSON文档在路径上是否包含特定对象
JSON_CONTAINS_PATH()Whether JSON document contains any data at pathJSON文档是否在路径中包含任何数据JSON文档在路径上是否包含任何数据
JSON_DEPTH()Maximum depth of JSON documentJSON文档的最大深度JSON文档的最大深度
JSON_EXTRACT()Return data from JSON document从JSON文档返回数据从JSON文档返回数据
JSON_INSERT()Insert data into JSON document将数据插入JSON文档将数据插入JSON文档
JSON_KEYS()Array of keys from JSON documentJSON文档中的键数组JSON文档中的键数组
JSON_LENGTH()Number of elements in JSON documentJSON文档中的元素数JSON文档中的元素数
JSON_MERGE() (deprecated)Merge JSON documents, preserving duplicate keys. Deprecated synonym for JSON_MERGE_PRESERVE()合并JSON文档,保留重复的键。 JSON_MERGE_PRESERVE()的已弃用同义词合并JSON文档,保留重复的密钥。JSON\u MERGE\u PRESERVE()的同义词已弃用
JSON_MERGE_PATCH()Merge JSON documents, replacing values of duplicate keys合并JSON文档,替换重复键的值合并JSON文档,替换重复键的值
JSON_MERGE_PRESERVE()Merge JSON documents, preserving duplicate keys合并JSON文档,保留重复的键合并JSON文档,保留重复的密钥
JSON_OBJECT()Create JSON object创建JSON对象创建JSON对象
JSON_OBJECTAGG()Return result set as a single JSON object将结果集作为单个JSON对象返回将结果集作为单个JSON对象返回
JSON_OVERLAPS() (introduced 8.0.17)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)比较两个JSON文档,如果它们有任何共同的键值对或数组元素,则返回TRUE(1),否则返回FALSE(0)
JSON_PRETTY()Print a JSON document in human-readable format以易于阅读的格式打印JSON文档以人类可读的格式打印JSON文档
JSON_QUOTE()Quote JSON document引用JSON文档引用JSON文档
JSON_REMOVE()Remove data from JSON document从JSON文档中删除数据从JSON文档中删除数据
JSON_REPLACE()Replace values in JSON document替换JSON文档中的值替换JSON文档中的值
JSON_SCHEMA_VALID() (introduced 8.0.17)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根据JSON架构验证JSON文档;如果文档根据架构验证,则返回TRUE/1;否则返回FALSE/0
JSON_SCHEMA_VALIDATION_REPORT() (introduced 8.0.17)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格式返回有关验证结果的报告,包括成功或失败以及失败原因根据JSON模式验证JSON文档;以JSON格式返回验证结果的报告,包括成功或失败以及失败的原因
JSON_SEARCH()Path to value within JSON documentJSON文档中值的路径JSON文档中的值路径
JSON_SET()Insert data into JSON document将数据插入JSON文档将数据插入JSON文档
JSON_STORAGE_FREE()Freed space within binary representation of JSON column value following partial update部分更新后,JSON列值的二进制表示形式中的可用空间部分更新后JSON列值的二进制表示中释放的空间
JSON_STORAGE_SIZE()Space used for storage of binary representation of a JSON document用于存储JSON文档的二进制表示的空间用于存储JSON文档的二进制表示形式的空间
JSON_TABLE()Return data from a JSON expression as a relational table从JSON表达式返回数据作为关系表以关系表的形式从JSON表达式返回数据
JSON_TYPE()Type of JSON valueJSON值类型JSON值的类型
JSON_UNQUOTE()Unquote JSON value取消引用JSON值取消引用JSON值
JSON_VALID()Whether JSON value is validJSON值是否有效JSON值是否有效
JSON_VALUE() (introduced 8.0.21)Extract value from JSON document at location pointed to by path provided; return this value as VARCHAR(512) or specified type在提供的路径指向的位置从JSON文档中提取值;以VARCHAR(512)或指定的类型返回此值从JSON文档中提取值,该值位于提供的路径所指向的位置;将该值作为VARCHAR(512)或指定类型返回
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最后一个INSERT的AUTOINCREMENT列的值上次插入的自动增量列的值
LAST_VALUE()Value of argument from last row of window frame窗口框架最后一行的参数值窗口框架最后一行的参数值
LCASE()Synonym for LOWER()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从Point值构造LineString从点值构造线串
LN()Return the natural logarithm of the argument返回参数的自然对数返回参数的自然对数
LOAD_FILE()Load the named file加载命名文件加载命名文件
LOCALTIME(), LOCALTIMESynonym for NOW()NOW()的同义词NOW()的同义词
LOCALTIMESTAMP, LOCALTIMESTAMP()Synonym for NOW()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为底的对数返回参数的以10为底的对数
LOG2()Return the base-2 logarithm of the argument返回参数的以2为底的对数返回参数以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 slave 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一个几何体的MBR是否包含另一个几何体的MBR
MBRCoveredBy()Whether one MBR is covered by another一个MBR是否被另一个覆盖一个MBR是否被另一个MBR覆盖
MBRCovers()Whether one MBR covers another一个MBR是否涵盖另一个一个MBR是否覆盖另一个MBR
MBRDisjoint()Whether MBRs of two geometries are disjoint两个几何的MBR是否不相交两种几何形状的MBR是否不相交
MBREquals()Whether MBRs of two geometries are equal两个几何的MBR是否相等两种几何形状的MBR是否相等
MBRIntersects()Whether MBRs of two geometries intersect两个几何的MBR是否相交两种几何形状的MBR是否相交
MBROverlaps()Whether MBRs of two geometries overlap两个几何的MBR是否重叠两种几何形状的MBR是否重叠
MBRTouches()Whether MBRs of two geometries touch两个几何的MBR是否接触两个几何形状的MBR是否接触
MBRWithin()Whether MBR of one geometry is within MBR of another一个几何的MBR是否在另一个几何的MBR内一个几何体的MBR是否在另一个几何体的MBR内
MD5()Calculate MD5 checksum计算MD5校验和计算MD5校验和
MEMBER OF() (introduced 8.0.17)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)如果第一个操作数与作为第二个操作数传递的JSON数组的任何元素匹配,则返回true(1),否则返回false(0)
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从LineString值构造MultiLineString从LineString值构造多行字符串
MultiPoint()Construct MultiPoint from Point values从Point值构造MultiPoint从点值构造多点
MultiPolygon()Construct MultiPolygon from Polygon values从多边形值构造MultiPolygon从多边形值构造多重多边形
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 REGEXP否REGEXPREGEXP的否定
NOW()Return the current date and time返回当前日期和时间返回当前日期和时间
NTH_VALUE()Value of argument from N-th row of window frame窗框第N行的自变量值窗口框架第N行的参数值
NTILE()Bucket number of current row within its partition.分区中当前行的存储桶号。当前行在其分区内的存储桶数。
NULLIF()Return NULL if expr1 = expr2如果expr1 = expr2,则返回NULL如果expr1=expr2,则返回NULL
OCT()Return a string containing octal representation of a number返回包含数字的八进制表示形式的字符串返回一个包含数字的八进制表示的字符串
OCTET_LENGTH()Synonym for LENGTH()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返回pi的值返回pi的值
Point()Construct Point from coordinates从坐标构造点从坐标构造点
Polygon()Construct Polygon from LineString arguments从LineString参数构造多边形从LineString参数构造多边形
POSITION()Synonym for LOCATE()LOCATE()的同义词LOCATE()的同义词
POW()Return the argument raised to the specified power将参数提高到指定的幂将引发的参数返回指定的幂
POWER()Return the argument raised to the specified power将参数提高到指定的幂将引发的参数返回指定的幂
PS_CURRENT_THREAD_ID() (introduced 8.0.16)Performance Schema thread ID for current thread当前线程的性能架构线程ID当前线程的性能架构线程ID
PS_THREAD_ID() (introduced 8.0.16)Performance Schema thread ID for given thread给定线程的性能架构线程ID给定线程的性能架构线程ID
QUARTER()Return the quarter from a date argument从日期参数返回季度从日期参数返回季度
QUOTE()Escape the argument for use in an SQL statement转义要在SQL语句中使用的参数转义参数以在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文档返回表示内存角色子图的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”格式将秒转换为“hh:mm:ss”格式
SECOND()Return the second (0-59)返回第二个(0-59)返回第二个(0-59)
SESSION_USER()Synonym for USER()USER()的同义词USER()的同义词
SHA1(), SHA()Calculate an SHA-1 160-bit checksum计算SHA-1 160位校验和计算SHA-1 160位校验和
SHA2()Calculate an SHA-2 checksum计算SHA-2校验和计算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返回soundex字符串返回soundex字符串
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从内部几何格式转换为WKB
ST_AsGeoJSON()Generate GeoJSON object from geometry从几何体生成GeoJSON对象从几何体生成GeoJSON对象
ST_AsText(), ST_AsWKT()Convert from internal geometry format to WKT从内部几何格式转换为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_Buffer()的策略选项
ST_Centroid()Return centroid as a point返回质心为点返回质心作为点
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 LineStringLineString的终点线串终点
ST_Envelope()Return MBR of geometry返回几何的MBR返回几何体MBR
ST_Equals()Whether one geometry is equal to another一个几何是否等于另一个一个几何体是否等于另一个几何体
ST_ExteriorRing()Return exterior ring of Polygon返回多边形的外圈返回多边形外环
ST_GeoHash()Produce a geohash value产生一个哈希值生成geohash值
ST_GeomCollFromText(), ST_GeometryCollectionFromText(), ST_GeomCollFromTxt()Return geometry collection from WKT从WKT返回几何集合从WKT返回几何体集合
ST_GeomCollFromWKB(), ST_GeometryCollectionFromWKB()Return geometry collection from WKB从WKB返回几何集合从WKB返回几何图形集合
ST_GeometryN()Return N-th geometry from geometry collection从几何集合返回第N个几何从几何集合返回第N个几何图形
ST_GeometryType()Return name of geometry type返回几何类型的名称返回几何类型的名称
ST_GeomFromGeoJSON()Generate geometry from GeoJSON object从GeoJSON对象生成几何从GeoJSON对象生成几何体
ST_GeomFromText(), ST_GeometryFromText()Return geometry from WKT从WKT返回几何从WKT返回几何图形
ST_GeomFromWKB(), ST_GeometryFromWKB()Return geometry from WKB从WKB返回几何从WKB返回几何图形
ST_InteriorRingN()Return N-th interior ring of Polygon返回多边形的第N个内环内环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值返回纬度从geohash值返回纬度
ST_Latitude() (introduced 8.0.12)Return latitude of Point返回点的纬度返回点纬度
ST_Length()Return length of LineString返回LineString的长度字符串返回长度
ST_LineFromText(), ST_LineStringFromText()Construct LineString from WKT从WKT构造LineString从WKT构造线串
ST_LineFromWKB(), ST_LineStringFromWKB()Construct LineString from WKB从WKB构造LineString从WKB构造线串
ST_LongFromGeoHash()Return longitude from geohash value从geohash值返回经度从geohash值返回经度
ST_Longitude() (introduced 8.0.12)Return longitude of Point返回点经度返回点经度
ST_MakeEnvelope()Rectangle around two points围绕两点的矩形两点周围的矩形
ST_MLineFromText(), ST_MultiLineStringFromText()Construct MultiLineString from WKT从WKT构造MultiLineString从WKT构造多行线
ST_MLineFromWKB(), ST_MultiLineStringFromWKB()Construct MultiLineString from WKB从WKB构造MultiLineString从WKB构造多行
ST_MPointFromText(), ST_MultiPointFromText()Construct MultiPoint from WKT从WKT构造MultiPoint从WKT构造多点
ST_MPointFromWKB(), ST_MultiPointFromWKB()Construct MultiPoint from WKB从WKB构造MultiPoint从WKB构建多点
ST_MPolyFromText(), ST_MultiPolygonFromText()Construct MultiPolygon from WKT从WKT构造MultiPolygon从WKT构造多多边形
ST_MPolyFromWKB(), ST_MultiPolygonFromWKB()Construct MultiPolygon from WKB从WKB构造MultiPolygon从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中的点数返回LineString中的点数
ST_Overlaps()Whether one geometry overlaps another一个几何图形是否重叠一个几何体是否与另一个几何体重叠
ST_PointFromGeoHash()Convert geohash value to POINT value将geohash值转换为POINT值将geohash值转换为点值
ST_PointFromText()Construct Point from WKTWKT的构造点从WKT构建点
ST_PointFromWKB()Construct Point from WKBWKB的构造点WKB的施工点
ST_PointN()Return N-th point from LineString从LineString返回第N个点从LineString返回第N个点
ST_PolyFromText(), ST_PolygonFromText()Construct Polygon from WKT从WKT构造多边形从WKT构造多边形
ST_PolyFromWKB(), ST_PolygonFromWKB()Construct Polygon from WKB从WKB构造多边形从WKB构造多边形
ST_Simplify()Return simplified geometry返回简化的几何返回简化几何体
ST_SRID()Return spatial reference system ID for geometry返回几何的空间参考系统ID返回几何图形的空间参考系统ID
ST_StartPoint()Start Point of LineStringLineString的起点线串起点
ST_SwapXY()Return argument with X/Y coordinates swapped返回参数已交换X / Y坐标交换了X/Return坐标
ST_SymDifference()Return point set symmetric difference of two geometries返回点设置两个几何的对称差两个几何体的返回点集对称差分
ST_Touches()Whether one geometry touches another一种几何是否接触另一种一个几何体是否接触另一个几何体
ST_Transform() (introduced 8.0.13)Transform coordinates of geometry变换几何坐标变换几何坐标
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坐标返回点的X坐标
ST_Y()Return Y coordinate of Point返回点的Y坐标返回点的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()的同义词当使用三个参数调用时,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()的同义词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从日期时间表达式中减去一个间隔从日期时间表达式中减去间隔
TO_BASE64()Return the argument converted to a base-64 string返回转换为以64为底的字符串的参数返回转换为64进制字符串的参数
TO_DAYS()Return the date argument converted to days返回日期参数转换为天返回转换为天的日期参数
TO_SECONDS()Return the date or datetime argument converted to seconds since Year 0返回从Year 0开始转换为秒的date或datetime参数返回从0年起转换为秒的日期或日期时间参数
TRIM()Remove leading and trailing spaces删除前导和尾随空格删除前导空格和尾随空格
TRUNCATE()Truncate to specified number of decimal places截断为指定的小数位数截断到指定的小数位数
UCASE()Synonym for UPPER()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时间戳返回Unix时间戳
UpdateXML()Return replaced XML fragment返回替换的XML片段返回替换的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日期
UTC_TIME()Return the current UTC time返回当前UTC时间返回当前UTC时间
UTC_TIMESTAMP()Return the current UTC date and time返回当前UTC日期和时间返回当前UTC日期和时间
UUID()Return a Universal Unique Identifier (UUID)返回通用唯一标识符(UUID)返回通用唯一标识符(UUID)
UUID_SHORT()Return an integer-valued universal identifier返回一个整数值的通用标识符返回整数值通用标识符
UUID_TO_BIN()Convert string UUID to binary将字符串UUID转换为二进制将字符串UUID转换为二进制
VALIDATE_PASSWORD_STRENGTH()Determine strength of password确定密码强度确定密码强度
VALUES()Define the values to be used during an INSERT定义在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服务器版本的字符串服务器返回一个指示MySQL版本的字符串
WAIT_FOR_EXECUTED_GTID_SET()Wait until the given GTIDs have executed on the slave.等待直到给定的GTID在从站上执行。等待给定的gtid在从机上执行。
WAIT_UNTIL_SQL_THREAD_AFTER_GTIDS() (deprecated 8.0.18)Use WAIT_FOR_EXECUTED_GTID_SET().使用WAIT_FOR_EXECUTED_GTID_SET()。使用WAIT_FOR_EXECUTED_GTID_SET()。
WEEK()Return the week number返回星期数返回周数
WEEKDAY()Return the weekday index返回工作日索引返回工作日索引
WEEKOFYEAR()Return the calendar week of the date (1-53)返回日期的日历周(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按位反转位反转

 

官网文档地址:

https://dev.mysql.com/doc/refman/8.0/en/function-reference.html

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值