Mega Code Archive

 
Categories / MySQL / String
 

Identify the collation used for a string by using the COLLATION() function

mysql> mysql> SELECT COLLATION('cats and dogs'); +----------------------------+ | COLLATION('cats and dogs') | +----------------------------+ | latin1_swedish_ci          | +----------------------------+ 1 row in set (0.00 sec) mysql>