0% found this document useful (0 votes)
10 views

Function Mysql

scrpit myqpl

Uploaded by

Emmi Shelly889
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

Function Mysql

scrpit myqpl

Uploaded by

Emmi Shelly889
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 25

Introd Depre

Name Description uced cated


& 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
%, MOD Modulo 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().
Return value from JSON
column after evaluating path
and unquoting the result;
equivalent to
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)
= Equal operator
^ Bitwise XOR
ABS() Return the absolute value
ACOS() Return the arc cosine
Add time values (intervals)
ADDDATE() to a date value
Introd Depre
Name Description uced cated
ADDTIME() Add time
AES_DECRYPT() Decrypt using AES
AES_ENCRYPT() Encrypt using AES
AND, && Logical AND
Suppress
ONLY_FULL_GROUP_B
ANY_VALUE() Y value rejection
Return numeric value of
ASCII() left-most character
ASIN() Return the arc sine
ATAN() Return the arc tangent
Return the arc tangent of the
ATAN2(), ATAN() two arguments
Return the average value of
AVG() the argument
Repeatedly execute an
BENCHMARK() expression
Whether a value is within a
BETWEEN ... AND ... range of values
Return a string containing
binary representation of a
BIN() number
Convert binary UUID to
BIN_TO_UUID() string
Cast a string to a binary
BINARY string 8.0.27
BIT_AND() Return bitwise AND
Return the number of bits
BIT_COUNT() that are set
Return length of argument
BIT_LENGTH() 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
CASE Case operator
Introd Depre
Name Description uced cated
Cast a value as a certain
CAST() type
Return the smallest integer
value not less than the
CEIL() argument
Return the smallest integer
value not less than the
CEILING() argument
Return the character for
CHAR() each integer passed
Return number of characters
CHAR_LENGTH() in argument
Synonym for
CHARACTER_LENGTH() CHAR_LENGTH()
Return the character set of
CHARSET() the argument
Return the first non-NULL
COALESCE() argument
Return the collation
coercibility value of the
COERCIBILITY() string argument
Return the collation of the
COLLATION() string argument
Return result as a binary
COMPRESS() string
CONCAT() Return concatenated string
Return concatenate with
CONCAT_WS() separator
Return the connection ID
(thread ID) for the
CONNECTION_ID() connection
Convert numbers between
CONV() different number bases
Cast a value as a certain
CONVERT() type
Convert from one time zone
CONVERT_TZ() to another
COS() Return the cosine
COT() Return the cotangent
Return a count of the
COUNT() number of rows returned
COUNT(DISTINCT) Return the count of a
Introd Depre
Name Description uced cated
number of different values
Compute a cyclic
CRC32() redundancy check value
Cumulative distribution
CUME_DIST() value
CURDATE() Return the current date
CURRENT_DATE(), CURRENT_DATE Synonyms for CURDATE()
Return the current active
CURRENT_ROLE() roles
CURRENT_TIME(), CURRENT_TIME Synonyms for CURTIME()
CURRENT_TIMESTAMP(), CURRENT_TIMESTAMP Synonyms for NOW()
The authenticated user name
CURRENT_USER(), CURRENT_USER and host name
CURTIME() Return the current time
Return the default (current)
DATABASE() database name
Extract the date part of a
DATE() date or datetime expression
Add time values (intervals)
DATE_ADD() to a date value
DATE_FORMAT() Format date as specified
Subtract a time value
DATE_SUB() (interval) from a date
DATEDIFF() Subtract two dates
Synonym for
DAY() DAYOFMONTH()
Return the name of the
DAYNAME() weekday
Return the day of the month
DAYOFMONTH() (0-31)
Return the weekday index
DAYOFWEEK() of the argument
Return the day of the year
DAYOFYEAR() (1-366)
Return the default value for
DEFAULT() a table column
DEGREES() Convert radians to degrees
Rank of current row within
DENSE_RANK() its partition, without gaps
DIV Integer division
Introd Depre
Name Description uced cated
Return string at index
ELT() number
EXP() Raise to the power of
Return a string such that for
every bit set in the value
bits, you get an on string
and for every unset bit, you
EXPORT_SET() get an off string
EXTRACT() Extract part of a date
Extract a value from an
XML string using XPath
ExtractValue() notation
Index (position) of first
argument in subsequent
FIELD() arguments
Index (position) of first
argument within second
FIND_IN_SET() argument
Value of argument from
FIRST_VALUE() first row of window frame
Return the largest integer
value not greater than the
FLOOR() argument
Return a number formatted
to specified number of
FORMAT() decimal places
Convert byte count to value
FORMAT_BYTES() with units 8.0.16
Convert time in picoseconds
FORMAT_PICO_TIME() to value with units 8.0.16
For a SELECT with a
LIMIT clause, the number
of rows that would be
returned were there no
FOUND_ROWS() LIMIT clause
Decode base64 encoded
FROM_BASE64() string and return result
Convert a day number to a
FROM_DAYS() date
Format Unix timestamp as a
FROM_UNIXTIME() date
Construct geometry
GeomCollection() collection from geometries
GeometryCollection() Construct geometry
Introd Depre
Name Description uced cated
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
Distinguish super-aggregate
ROLLUP rows from regular
GROUPING() rows
Return true if all GTIDs in
subset are also in set;
GTID_SUBSET() otherwise false.
Return all GTIDs in set that
GTID_SUBTRACT() are not in subset.
Hexadecimal representation
HEX() of decimal or string value
HOUR() Extract the hour
ICU_VERSION() ICU library version
IF() If/else construct
IFNULL() Null if/else construct
Whether a value is within a
IN() set of values
Return the numeric value of
INET_ATON() an IP address
Return the IP address from a
INET_NTOA() numeric value
Return the numeric value of
INET6_ATON() an IPv6 address
Return the IPv6 address
INET6_NTOA() from a numeric value
Insert substring at specified
position up to specified
INSERT() number of characters
Return the index of the first
INSTR() occurrence of substring
INTERNAL_AUTO_INCREMENT() Internal use only
INTERNAL_AVG_ROW_LENGTH() Internal use only
Introd Depre
Name Description uced cated
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
Return the index of the
argument that is less than
INTERVAL() the first argument
Test a value against a
IS boolean
Whether the named lock is
IS_FREE_LOCK() free
Whether argument is an
IS_IPV4() IPv4 address
Whether argument is an
IS_IPV4_COMPAT() IPv4-compatible address
Whether argument is an
IS_IPV4_MAPPED() IPv4-mapped address
Whether argument is an
IS_IPV6() IPv6 address
Test a value against a
IS NOT boolean
IS NOT NULL NOT NULL value test
IS NULL NULL value test
IS_USED_LOCK() Whether the named lock is
Introd Depre
Name Description uced cated
in use; return connection
identifier if true
Whether argument is a valid
IS_UUID() UUID
Test whether the argument
ISNULL() is NULL
JSON_ARRAY() Create JSON array
Append data to JSON
JSON_ARRAY_APPEND() document
JSON_ARRAY_INSERT() Insert into JSON array
Return result set as a single
JSON_ARRAYAGG() JSON array
Whether JSON document
contains specific object at
JSON_CONTAINS() path
Whether JSON document
JSON_CONTAINS_PATH() contains any data at path
Maximum depth of JSON
JSON_DEPTH() document
Return data from JSON
JSON_EXTRACT() document
Insert data into JSON
JSON_INSERT() document
Array of keys from JSON
JSON_KEYS() document
Number of elements in
JSON_LENGTH() JSON document
Merge JSON documents,
preserving duplicate keys.
Deprecated synonym for
JSON_MERGE_PRESERV
JSON_MERGE() E() Yes
Merge JSON documents,
replacing values of duplicate
JSON_MERGE_PATCH() keys
Merge JSON documents,
JSON_MERGE_PRESERVE() preserving duplicate keys
JSON_OBJECT() Create JSON object
Return result set as a single
JSON_OBJECTAGG() JSON object
JSON_OVERLAPS() Compares two JSON 8.0.17
documents, returns TRUE
Introd Depre
Name Description uced cated
(1) if these have any key-
value pairs or array
elements in common,
otherwise FALSE (0)
Print a JSON document in
JSON_PRETTY() human-readable format
JSON_QUOTE() Quote JSON document
Remove data from JSON
JSON_REMOVE() document
Replace values in JSON
JSON_REPLACE() document
Validate JSON document
against JSON schema;
returns TRUE/1 if document
validates against schema, or
JSON_SCHEMA_VALID() FALSE/0 if it does not 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
JSON_SCHEMA_VALIDATION_REPORT() failure 8.0.17
Path to value within JSON
JSON_SEARCH() document
Insert data into JSON
JSON_SET() document
Freed space within binary
representation of JSON
column value following
JSON_STORAGE_FREE() partial update
Space used for storage of
binary representation of a
JSON_STORAGE_SIZE() JSON document
Return data from a JSON
expression as a relational
JSON_TABLE() table
JSON_TYPE() Type of JSON value
JSON_UNQUOTE() Unquote JSON value
Whether JSON value is
JSON_VALID() valid
JSON_VALUE() Extract value from JSON 8.0.21
document at location
pointed to by path provided;
return this value as
Introd Depre
Name Description uced cated
VARCHAR(512) or
specified type
Value of argument from row
lagging current row within
LAG() partition
Return the last day of the
LAST_DAY month for the argument
Value of the
AUTOINCREMENT
LAST_INSERT_ID() column for the last INSERT
Value of argument from last
LAST_VALUE() row of window frame
LCASE() Synonym for LOWER()
Value of argument from row
leading current row within
LEAD() partition
Return the smallest
LEAST() argument
Return the leftmost number
LEFT() of characters as specified
Return the length of a string
LENGTH() in bytes
LIKE Simple pattern matching
Construct LineString from
LineString() Point values
Return the natural logarithm
LN() of the argument
LOAD_FILE() Load the named file
LOCALTIME(), LOCALTIME Synonym for NOW()
LOCALTIMESTAMP, LOCALTIMESTAMP() Synonym for NOW()
Return the position of the
LOCATE() first occurrence of substring
Return the natural logarithm
LOG() of the first argument
Return the base-10
LOG10() logarithm of the argument
Return the base-2 logarithm
LOG2() of the argument
Return the argument in
LOWER() lowercase
LPAD() Return the string argument,
Introd Depre
Name Description uced cated
left-padded with the
specified string
LTRIM() Remove leading spaces
Return a set of comma-
separated strings that have
the corresponding bit in bits
MAKE_SET() set
Create a date from the year
MAKEDATE() and day of year
Create time from hour,
MAKETIME() minute, second
Block until the replica has
read and applied all updates
MASTER_POS_WAIT() up to the specified position 8.0.26
MATCH() Perform full-text search
MAX() Return the maximum value
Whether MBR of one
geometry contains MBR of
MBRContains() another
Whether one MBR is
MBRCoveredBy() covered by another
Whether one MBR covers
MBRCovers() another
Whether MBRs of two
MBRDisjoint() geometries are disjoint
Whether MBRs of two
MBREquals() geometries are equal
Whether MBRs of two
MBRIntersects() geometries intersect
Whether MBRs of two
MBROverlaps() geometries overlap
Whether MBRs of two
MBRTouches() geometries touch
Whether MBR of one
geometry is within MBR of
MBRWithin() another
MD5() Calculate MD5 checksum
Returns true (1) if first
operand matches any
element of JSON array
passed as second operand,
MEMBER OF() otherwise returns false (0) 8.0.17
Introd Depre
Name Description uced cated
Return the microseconds
MICROSECOND() from argument
Return a substring starting
MID() from the specified position
MIN() Return the minimum value
Return the minute from the
MINUTE() argument
MOD() Return the remainder
Return the month from the
MONTH() date passed
Return the name of the
MONTHNAME() month
Contruct MultiLineString
MultiLineString() from LineString values
Construct MultiPoint from
MultiPoint() Point values
Construct MultiPolygon
MultiPolygon() from Polygon values
Cause the column to have
NAME_CONST() the given name
NOT, ! Negates value
Whether a value is not
NOT BETWEEN ... AND ... within a range of values
Whether a value is not
NOT IN() within a set of values
Negation of simple pattern
NOT LIKE matching
NOT REGEXP Negation of REGEXP
Return the current date and
NOW() time
Value of argument from N-
NTH_VALUE() th row of window frame
Bucket number of current
NTILE() row within its partition.
Return NULL if expr1 =
NULLIF() expr2
Return a string containing
octal representation of a
OCT() number
OCTET_LENGTH() Synonym for LENGTH()
OR, || Logical OR
Introd Depre
Name Description uced cated
Return character code for
leftmost character of the
ORD() argument
PERCENT_RANK() Percentage rank value
Add a period to a year-
PERIOD_ADD() month
Return the number of
PERIOD_DIFF() months between periods
PI() Return the value of pi
Construct Point from
Point() coordinates
Construct Polygon from
Polygon() LineString arguments
POSITION() Synonym for LOCATE()
Return the argument raised
POW() to the specified power
Return the argument raised
POWER() to the specified power
Performance Schema thread
PS_CURRENT_THREAD_ID() ID for current thread 8.0.16
Performance Schema thread
PS_THREAD_ID() ID for given thread 8.0.16
Return the quarter from a
QUARTER() date argument
Escape the argument for use
QUOTE() in an SQL statement
Return argument converted
RADIANS() to radians
Return a random floating-
RAND() point value
RANDOM_BYTES() Return a random byte vector
Rank of current row within
RANK() its partition, with gaps
Whether string matches
REGEXP regular expression
Starting index of substring
REGEXP_INSTR() matching regular expression
Whether string matches
REGEXP_LIKE() regular expression
Replace substrings matching
REGEXP_REPLACE() regular expression
Introd Depre
Name Description uced cated
Return substring matching
REGEXP_SUBSTR() regular expression
Release all current named
RELEASE_ALL_LOCKS() locks
RELEASE_LOCK() Release the named lock
Repeat a string the specified
REPEAT() number of times
Replace occurrences of a
REPLACE() specified string
Reverse the characters in a
REVERSE() string
Return the specified
rightmost number of
RIGHT() characters
Whether string matches
RLIKE regular expression
Return a GraphML
document representing
ROLES_GRAPHML() memory role subgraphs
ROUND() Round the argument
The number of rows
ROW_COUNT() updated
Number of current row
ROW_NUMBER() within its partition
Append string the specified
RPAD() number of times
RTRIM() Remove trailing spaces
SCHEMA() Synonym for DATABASE()
Converts seconds to
SEC_TO_TIME() 'hh:mm:ss' format
SECOND() Return the second (0-59)
SESSION_USER() Synonym for USER()
Calculate an SHA-1 160-bit
SHA1(), SHA() checksum
Calculate an SHA-2
SHA2() checksum
Return the sign of the
SIGN() argument
Return the sine of the
SIN() argument
SLEEP() Sleep for a number of
Introd Depre
Name Description uced cated
seconds
SOUNDEX() Return a soundex string
SOUNDS LIKE Compare sounds
Block until the replica has
read and applied all updates
SOURCE_POS_WAIT() up to the specified position 8.0.26
Return a string of the
SPACE() specified number of spaces
Return the square root of the
SQRT() argument
Return Polygon or
ST_Area() MultiPolygon area
Convert from internal
ST_AsBinary(), ST_AsWKB() geometry format to WKB
Generate GeoJSON object
ST_AsGeoJSON() from geometry
Convert from internal
ST_AsText(), ST_AsWKT() geometry format to WKT
Return geometry of points
within given distance from
ST_Buffer() geometry
Produce strategy option for
ST_Buffer_Strategy() ST_Buffer()
ST_Centroid() Return centroid as a point
Aggregate spatial values
ST_Collect() into collection 8.0.24
Whether one geometry
ST_Contains() contains another
Return convex hull of
ST_ConvexHull() geometry
Whether one geometry
ST_Crosses() crosses another
Return point set difference
ST_Difference() of two geometries
ST_Dimension() Dimension of geometry
Whether one geometry is
ST_Disjoint() disjoint from another
The distance of one
ST_Distance() geometry from another
Minimum distance on earth
ST_Distance_Sphere() between two geometries
Introd Depre
Name Description uced cated
ST_EndPoint() End Point of LineString
ST_Envelope() Return MBR of geometry
Whether one geometry is
ST_Equals() equal to another
Return exterior ring of
ST_ExteriorRing() Polygon
The discrete Fréchet
distance of one geometry
ST_FrechetDistance() from another 8.0.23
ST_GeoHash() Produce a geohash value
ST_GeomCollFromText(), ST_GeometryCollectionFr Return geometry collection
omText(), ST_GeomCollFromTxt() from WKT
ST_GeomCollFromWKB(), ST_GeometryCollectionFro Return geometry collection
mWKB() from WKB
Return N-th geometry from
ST_GeometryN() geometry collection
Return name of geometry
ST_GeometryType() type
Generate geometry from
ST_GeomFromGeoJSON() GeoJSON object
ST_GeomFromText(), ST_GeometryFromText() Return geometry from WKT
ST_GeomFromWKB(), ST_GeometryFromWKB() Return geometry from WKB
The discrete Hausdorff
distance of one geometry
ST_HausdorffDistance() from another 8.0.23
Return N-th interior ring of
ST_InteriorRingN() Polygon
Return point set intersection
ST_Intersection() of two geometries
Whether one geometry
ST_Intersects() intersects another
Whether a geometry is
ST_IsClosed() closed and simple
Whether a geometry is
ST_IsEmpty() empty
Whether a geometry is
ST_IsSimple() simple
ST_IsValid() Whether a geometry is valid
Return latitude from
ST_LatFromGeoHash() geohash value
Introd Depre
Name Description uced cated
ST_Latitude() Return latitude of Point 8.0.12
ST_Length() Return length of LineString
Construct LineString from
ST_LineFromText(), ST_LineStringFromText() WKT
Construct LineString from
ST_LineFromWKB(), ST_LineStringFromWKB() WKB
The point a given
percentage along a
ST_LineInterpolatePoint() LineString 8.0.24
The points a given
percentage along a
ST_LineInterpolatePoints() LineString 8.0.24
Return longitude from
ST_LongFromGeoHash() geohash value
ST_Longitude() Return longitude of Point 8.0.12
ST_MakeEnvelope() Rectangle around two points
ST_MLineFromText(), ST_MultiLineStringFromText Construct MultiLineString
() from WKT
Construct MultiLineString
ST_MLineFromWKB(), ST_MultiLineStringFromWKB() from WKB
Construct MultiPoint from
ST_MPointFromText(), ST_MultiPointFromText() WKT
Construct MultiPoint from
ST_MPointFromWKB(), ST_MultiPointFromWKB() WKB
Construct MultiPolygon
ST_MPolyFromText(), ST_MultiPolygonFromText() from WKT
Construct MultiPolygon
ST_MPolyFromWKB(), ST_MultiPolygonFromWKB() from WKB
Return number of
geometries in geometry
ST_NumGeometries() collection
Return number of interior
ST_NumInteriorRing(), ST_NumInteriorRings() rings in Polygon
Return number of points in
ST_NumPoints() LineString
Whether one geometry
ST_Overlaps() overlaps another
The point a given distance
ST_PointAtDistance() along a LineString 8.0.24
Convert geohash value to
ST_PointFromGeoHash() POINT value
Introd Depre
Name Description uced cated
ST_PointFromText() Construct Point from WKT
ST_PointFromWKB() Construct Point from WKB
Return N-th point from
ST_PointN() LineString
Construct Polygon from
ST_PolyFromText(), ST_PolygonFromText() WKT
Construct Polygon from
ST_PolyFromWKB(), ST_PolygonFromWKB() WKB
ST_Simplify() Return simplified geometry
Return spatial reference
ST_SRID() system ID for geometry
ST_StartPoint() Start Point of LineString
Return argument with X/Y
ST_SwapXY() coordinates swapped
Return point set symmetric
ST_SymDifference() difference of two geometries
Whether one geometry
ST_Touches() touches another
Transform coordinates of
ST_Transform() geometry 8.0.13
Return point set union of
ST_Union() two geometries
ST_Validate() Return validated geometry
Whether one geometry is
ST_Within() within another
Return X coordinate of
ST_X() Point
Return Y coordinate of
ST_Y() Point
Compute statement digest
STATEMENT_DIGEST() hash value
Compute normalized
STATEMENT_DIGEST_TEXT() statement digest
Return the population
STD() standard deviation
Return the population
STDDEV() standard deviation
Return the population
STDDEV_POP() standard deviation
Return the sample standard
STDDEV_SAMP() deviation
Introd Depre
Name Description uced cated
STR_TO_DATE() Convert a string to a date
STRCMP() Compare two strings
Synonym for DATE_SUB()
when invoked with three
SUBDATE() arguments
Return the substring as
SUBSTR() specified
Return the substring as
SUBSTRING() specified
Return a substring from a
string before the specified
number of occurrences of
SUBSTRING_INDEX() the delimiter
SUBTIME() Subtract times
SUM() Return the sum
Return the time at which the
SYSDATE() function executes
SYSTEM_USER() Synonym for USER()
Return the tangent of the
TAN() argument
Extract the time portion of
TIME() the expression passed
TIME_FORMAT() Format as time
Return the argument
TIME_TO_SEC() converted to seconds
TIMEDIFF() Subtract time
With a single argument, this
function returns the date or
datetime expression; with
two arguments, the sum of
TIMESTAMP() the arguments
Add an interval to a
TIMESTAMPADD() datetime expression
Return the difference of two
datetime expressions, using
TIMESTAMPDIFF() the units specified
Return the argument
converted to a base-64
TO_BASE64() string
Return the date argument
TO_DAYS() converted to days
TO_SECONDS() Return the date or datetime
Introd Depre
Name Description uced cated
argument converted to
seconds since Year 0
Remove leading and trailing
TRIM() spaces
Truncate to specified
TRUNCATE() number of decimal places
UCASE() Synonym for UPPER()
Uncompress a string
UNCOMPRESS() compressed
Return the length of a string
UNCOMPRESSED_LENGTH() before compression
Return a string containing
hex representation of a
UNHEX() number
UNIX_TIMESTAMP() Return a Unix timestamp
Return replaced XML
UpdateXML() fragment
UPPER() Convert to uppercase
The user name and host
USER() name provided by the client
UTC_DATE() Return the current UTC date
Return the current UTC
UTC_TIME() time
Return the current UTC date
UTC_TIMESTAMP() and time
Return a Universal Unique
UUID() Identifier (UUID)
Return an integer-valued
UUID_SHORT() universal identifier
Convert string UUID to
UUID_TO_BIN() binary
Determine strength of
VALIDATE_PASSWORD_STRENGTH() password
Define the values to be used
VALUES() during an INSERT
Return the population
VAR_POP() standard variance
VAR_SAMP() Return the sample variance
Return the population
VARIANCE() standard variance
VERSION() Return a string that indicates
Introd Depre
Name Description uced cated
the MySQL server version
Wait until the given GTIDs
have executed on the
WAIT_FOR_EXECUTED_GTID_SET() replica.
Use WAIT_FOR_EXECUTE
WAIT_UNTIL_SQL_THREAD_AFTER_GTIDS() D_GTID_SET(). 8.0.18
WEEK() Return the week number
WEEKDAY() Return the weekday index
Return the calendar week of
WEEKOFYEAR() the date (1-53)
Return the weight string for
WEIGHT_STRING() a string
XOR Logical XOR
YEAR() Return the year
YEARWEEK() Return the year and week
| Bitwise OR

~ Bitwise inversion

Name Description
ADDDATE() Add time values (intervals) to a date value
ADDTIME() Add time
CONVERT_TZ() Convert from one time zone to another
CURDATE() Return the current date
CURRENT_DATE(), CURRENT_DATE Synonyms for CURDATE()
CURRENT_TIME(), CURRENT_TIME Synonyms for CURTIME()
CURRENT_TIMESTAMP(), CURRENT_TIMESTAMP Synonyms for NOW()
CURTIME() Return the current time
Extract the date part of a date or datetime
DATE() 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()
Name Description
DAYNAME() Return the name of the weekday
DAYOFMONTH() Return the day of the month (0-31)
DAYOFWEEK() Return the weekday index of the argument
DAYOFYEAR() Return the day of the year (1-366)
EXTRACT() Extract part of a date
FROM_DAYS() Convert a day number to a date
FROM_UNIXTIME() Format Unix timestamp as a date
GET_FORMAT() Return a date format string
HOUR() Extract the hour
LAST_DAY Return the last day of the month for the argument
LOCALTIME(), LOCALTIME Synonym for NOW()
LOCALTIMESTAMP, LOCALTIMESTAMP() Synonym for NOW()
MAKEDATE() Create a date from the year and day of year
MAKETIME() Create time from hour, minute, second
MICROSECOND() Return the microseconds from argument
MINUTE() Return the minute from the argument
MONTH() Return the month from the date passed
MONTHNAME() Return the name of the month
NOW() Return the current date and time
PERIOD_ADD() Add a period to a year-month
PERIOD_DIFF() Return the number of months between periods
QUARTER() Return the quarter from a date argument
SEC_TO_TIME() Converts seconds to 'hh:mm:ss' format
SECOND() Return the second (0-59)
STR_TO_DATE() Convert a string to a date
Synonym for DATE_SUB() when invoked with three
SUBDATE() arguments
SUBTIME() Subtract times
SYSDATE() Return the time at which the function executes
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
With a single argument, this function returns the date
or datetime expression; with two arguments, the sum
TIMESTAMP() of the arguments
Name Description
TIMESTAMPADD() Add an interval to a datetime expression
Return the difference of two datetime expressions,
TIMESTAMPDIFF() using the units specified
TO_DAYS() Return the date argument converted to days
Return the date or datetime argument converted to
TO_SECONDS() seconds since Year 0
UNIX_TIMESTAMP() Return a Unix timestamp
UTC_DATE() Return the current UTC date
UTC_TIME() Return the current UTC time
UTC_TIMESTAMP() Return the current UTC date and time
WEEK() Return the week number
WEEKDAY() Return the weekday index
WEEKOFYEAR() Return the calendar week of the date (1-53)
YEAR() Return the year
YEARWEEK() Return the year and week

Name Description
ASCII() Return numeric value of left-most character
BIN() Return a string containing binary representation of a number
BIT_LENGTH() Return length of argument in bits
CHAR() Return the character for each integer passed
CHAR_LENGTH() Return number of characters in argument
CHARACTER_LENGTH() Synonym for CHAR_LENGTH()
CONCAT() Return concatenated string
CONCAT_WS() Return concatenate with separator
ELT() Return string at index number
Return a string such that for every bit set in the value bits, you get an on string
EXPORT_SET() and for every unset bit, you get an off string
FIELD() Index (position) of first argument in subsequent arguments
FIND_IN_SET() Index (position) of first argument within second argument
FORMAT() Return a number formatted to specified number of decimal places
FROM_BASE64() Decode base64 encoded string and return result
HEX() Hexadecimal representation of decimal or string value
INSERT() Insert substring at specified position up to specified number of characters
INSTR() Return the index of the first occurrence of substring
LCASE() Synonym for LOWER()
Name Description
LEFT() Return the leftmost number of characters as specified
LENGTH() Return the length of a string in bytes
LIKE Simple pattern matching
LOAD_FILE() Load the named file
LOCATE() Return the position of the first occurrence of substring
LOWER() Return the argument in lowercase
LPAD() Return the string argument, left-padded with the specified string
LTRIM() Remove leading spaces
Return a set of comma-separated strings that have the corresponding bit in
MAKE_SET() bits set
MATCH() Perform full-text search
MID() Return a substring starting from the specified position
NOT LIKE Negation of simple pattern matching
NOT REGEXP Negation of REGEXP
OCT() Return a string containing octal representation of a number
OCTET_LENGTH() Synonym for LENGTH()
ORD() Return character code for leftmost character of the argument
POSITION() Synonym for LOCATE()
QUOTE() Escape the argument for use in an SQL statement
REGEXP Whether 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
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
RLIKE Whether string matches regular expression
RPAD() Append string the specified number of times
RTRIM() Remove trailing spaces
SOUNDEX() Return a soundex string
SOUNDS LIKE Compare sounds
SPACE() Return a string of the specified number of spaces
STRCMP() Compare two strings
SUBSTR() Return the substring as specified
Name Description
SUBSTRING() Return the substring as specified
Return a substring from a string before the specified number of occurrences of
SUBSTRING_INDEX() the delimiter
TO_BASE64() Return the argument converted to a base-64 string
TRIM() Remove leading and trailing spaces
UCASE() Synonym for UPPER()
UNHEX() Return a string containing hex representation of a number
UPPER() Convert to uppercase
WEIGHT_STRING() Return the weight string for a string

You might also like