CONVERT(
expr
,
type
)
,
CONVERT(
expr
USING
transcoding_name
)
The
CONVERT()
and
CAST()
functions take a value of one type and produce a value of another type.
The
type
can be one of the following values:
-
BINARY[(
N
)]
-
CHAR[(
N
)]
-
DATE
-
DATETIME
-
DECIMAL[(
M
[,
D
])]
-
SIGNED [INTEGER]
-
TIME
-
UNSIGNED [INTEGER]
http://dev.mysql.com/doc/refman/5.0/en/cast-functions.html#function_convert