recognized. For information about fractional seconds support in MySQL, see Section 11.2.6, “Fractional Seconds in Time Values” . 

For TIME  values specified as strings that include a time part delimiter, it is unnecessary to specify two digits for hours, minutes, or seconds values that are less than 10 . ’8:3:2’  is the same as ’08:03:02’ . 

## 9.1.4 Hexadecimal Literals 

Hexadecimal literal values are written using X’ val ’  or 0x val  notation, where val  contains hexadecimal digits ( 0..9 , A..F ). Lettercase of the digits and of any leading X  does not matter. A leading 0x  is case- sensitive and cannot be written as 0X . 

Legal hexadecimal literals: 

X’01AF’ X’01af’ x’01AF’ x’01af’ 0x01AF 0x01af 

Illegal hexadecimal literals: 

X’0G’ (G is not a hexadecimal digit) 0X01AF (0X must be written as 0x) 

Values written using X’ val ’  notation must contain an even number of digits or a syntax error occurs. To correct the problem, pad the value with a leading zero: 

mysql> SET @s = X’FFF’; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ’X’FFF’’ mysql> SET @s = X’0FFF’; Query OK, 0 rows affected (0.00 sec) 

Values written using 0x val  notation that contain an odd number of digits are treated as having an extra leading 0 . For example, 0xaaa  is interpreted as 0x0aaa . 

By default, a hexadecimal literal is a binary string, where each pair of hexadecimal digits represents a character: 

mysql> SELECT X’4D7953514C’, CHARSET(X’4D7953514C’); +---------------+------------------------+ | X’4D7953514C’ | CHARSET(X’4D7953514C’) | +---------------+------------------------+ | MySQL | binary | +---------------+------------------------+ mysql> SELECT 0x5461626c65, CHARSET(0x5461626c65); +--------------+-----------------------+ | 0x5461626c65 | CHARSET(0x5461626c65) | +--------------+-----------------------+ | Table | binary | +--------------+-----------------------+ 

A hexadecimal literal may have an optional character set introducer and COLLATE  clause, to designate it as a string that uses a particular character set and collation: 

[_ charset_name ] X’ val ’ [COLLATE collation_name ] 

Examples: 

