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
  http://dev.mysql.com/doc/refman/5.5/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 NCHAR[(N)]

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

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

o SIGNED [INTEGER]

  Produces a signed integer value.

o TIME

  Produces a TIME value.

o UNSIGNED [INTEGER]

  Produces an unsigned integer value.

URL: http://dev.mysql.com/doc/refman/5.5/en/cast-functions.html

