Cast Functions and Operators 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 . 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: In all cases, the string has the character set default collation. Produces a  DATE  value. Produces a  DATETIME  value. 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). Produces a  DOUBLE  result. Added in MySQL 8.0.17. 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. Produces a  JSON  value. For details on the rules for conversion of values between  JSON  and other types, see Comparison and Ordering of JSON Values. Like  CHAR , but produces a string with the national character set. See Section 10.3.7, “The National Character Set” . Unlike  CHAR ,  NCHAR  does not permit trailing character set information to be specified. 2237 • REAL • NCHAR[( N )] • JSON • FLOAT[( p )] • DOUBLE • DECIMAL[( M [, D ])] • DATETIME • DATE • UNICODE : Shorthand for  CHARACTER SET ucs2 . • ASCII : Shorthand for  CHARACTER SET latin1 . • CHARACTER SET  charset_name : Produces a string with the given character set. • CHAR[( N )] [ charset_info ]