Syntax
------ 
COERCIBILITY(str)
 
Description
----------- 
Returns the collation coercibility value of the string
argument. Coercibility defines what will be converted to
what in case of collation conflict, with an expression with
higher coercibility being converted to the collation of an
expression with lower coercibility.
 
Coercibility | Description | Example | 
 
0 | Explicit | Value using a COLLATE clause | 
 
1 | No collation | Concatenated strings using different
collations | 
 
2 | Implicit | Column value | 
 
3 | Constant | USER() return value | 
 
4 | Coercible | Literal string | 
 
5 | Ignorable | NULL or derived from NULL | 
 
Examples
-------- 
SELECT COERCIBILITY('abc' COLLATE latin1_swedish_ci);
+-----------------------------------------------+
| COERCIBILITY('abc' COLLATE latin1_swedish_ci) |
+-----------------------------------------------+
| 0 |
+-----------------------------------------------+
 
SELECT COERCIBILITY(USER());
+----------------------+
| COERCIBILITY(USER()) |
+----------------------+
| 3 |
+----------------------+
 
SELECT COERCIBILITY('abc');
+---------------------+
| COERCIBILITY('abc') |
+---------------------+
| 4 |
+---------------------+
 

 
 
 
 
 
 
 

URL: https://mariadb.com/kb/en/coercibility/