Syntax:
CONVERT(expr,type), CONVERT(expr USING transcoding_name)

The CONVERT() function takes an expression of any type and produces a
result value of the specified type.

Discussion of CONVERT(expr, type) syntax here also applies to CAST(expr
AS type), which is equivalent.

CONVERT(... USING ...) is standard SQL syntax. The non-USING form of
CONVERT() is ODBC syntax.

CONVERT() with USING converts data between different character sets. In
MySQL, transcoding names are the same as the corresponding character
set names. For example, this statement converts the string 'abc' in the
default character set to the corresponding string in the utf8 character
set:

SELECT CONVERT('abc' USING utf8);

CONVERT() without USING and CAST() take an expression and a type value
specifying the result type. These type values are permitted:

o BINARY[(N)]

  Produces a string with the BINARY data type. See
  https://dev.mysql.com/doc/refman/8.0/en/binary-varbinary.html for a
  description of how this affects comparisons. If the optional length N
  is given, BINARY(N) causes the cast to use no more than N bytes of
  the argument. Values shorter than N bytes are padded with 0x00 bytes
  to a length of N.

o CHAR[(N)] [charset_info]

  Produces a string with the CHAR data type. If the optional length N
  is given, CHAR(N) causes the cast to use no more than N characters of
  the argument. No padding occurs for values shorter than N characters.

  With no charset_info clause, CHAR produces a string with the default
  character set. To specify the character set explicitly, these
  charset_info values are permitted:

  o CHARACTER SET charset_name: Produces a string with the given
    character set.

  o ASCII: Shorthand for CHARACTER SET latin1.

  o UNICODE: Shorthand for CHARACTER SET ucs2.

  In all cases, the string has the default collation for the character
  set.

o DATE

  Produces a DATE value.

o DATETIME

  Produces a DATETIME value.

o DECIMAL[(M[,D])]

  Produces a DECIMAL value. If the optional M and D values are given,
  they specify the maximum number of digits (the precision) and the
  number of digits following the decimal point (the scale).

o DOUBLE

  Produces a DOUBLE result. Added in MySQL 8.0.17.

o FLOAT[(P)]

  If the precision P is not specified, produces a result of type FLOAT.
  If P is provided and 0 <= < P <= 24, the result is of type FLOAT. If
  25 <= P <= 53, the result is of type DOUBLE. If P < 0 or P > 53, an
  error is returned. Added in MySQL 8.0.17.

o JSON

  Produces a JSON value. For details on the rules for conversion of
  values between JSON and other types, see
  https://dev.mysql.com/doc/refman/8.0/en/json.html#json-comparison.

o NCHAR[(N)]

  Like CHAR, but produces a string with the national character set. See
  https://dev.mysql.com/doc/refman/8.0/en/charset-national.html.

  Unlike CHAR, NCHAR does not permit trailing character set information
  to be specified.

o REAL

  Produces a result of type REAL. This is actually FLOAT if
  REAL_AS_FLOAT SQL mode is enabled; otherwise the result is of type
  DOUBLE.

o SIGNED [INTEGER]

  Produces a signed integer value.

o TIME

  Produces a TIME value.

o UNSIGNED [INTEGER]

  Produces an unsigned integer value.

URL: https://dev.mysql.com/doc/refman/8.0/en/cast-functions.html

