MySQL Tutorial/Information Functions/COERCIBILITY

Материал из SQL эксперт
Перейти к: навигация, поиск

COERCIBILITY(str) returns the collation coercibility value of the string argument.

The return values have the meanings shown in the following table. Lower values have higher precedence.

Coercibility Meaning 0 Explicit collation 1 No collation 2 Implicit collation 3 System constant 4 Coercible 5 Ignorable



   <source lang="sql">

mysql> mysql> SELECT COERCIBILITY("abc" COLLATE latin1_swedish_ci); +-----------------------------------------------+ | COERCIBILITY("abc" COLLATE latin1_swedish_ci) | +-----------------------------------------------+ | 0 | +-----------------------------------------------+ 1 row in set (0.00 sec) mysql> mysql></source>


SELECT COERCIBILITY("abc");

   <source lang="sql">

mysql> mysql> mysql> SELECT COERCIBILITY("abc"); +---------------------+ | COERCIBILITY("abc") | +---------------------+ | 4 | +---------------------+ 1 row in set (0.00 sec)</source>


SELECT COERCIBILITY(USER());

   <source lang="sql">

mysql> mysql> SELECT COERCIBILITY(USER()); +----------------------+ | COERCIBILITY(USER()) | +----------------------+ | 3 | +----------------------+ 1 row in set (0.00 sec) mysql></source>