Name

COLLATION( )

Synopsis

COLLATION(string)

This function returns the collation for the character set of a given string. This function is available as of Version 4.1.0 of MySQL.

SELECT COLLATION('test');
+-------------------+
| COLLATION('test') |
+-------------------+
| latin1_swedish_ci |
+-------------------+

Get MySQL in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.