MySQL 中的 COERCIBILITY(str) 函数用来返回字符串参数的排序规则强制值。
COERCIBILITY(str)
str 字符串
(1)COERCIBILITY() 函数的基本用法,如下:
mysql> SELECT COERCIBILITY(USER());
+----------------------+
| COERCIBILITY(USER()) |
+----------------------+
| 3 |
+----------------------+
1 row in set (0.04 sec)
mysql> SELECT COERCIBILITY('abc');
+---------------------+
| COERCIBILITY('abc') |
+---------------------+
| 4 |
+---------------------+
1 row in set (0.04 sec)
mysql> SELECT COERCIBILITY(1000);
+--------------------+
| COERCIBILITY(1000) |
+--------------------+
| 5 |
+--------------------+
1 row in set (0.04 sec)