SHOW COLLATION

语法说明

显示 MatrixOne 支持字符集的排序规则。默认情况下,SHOW COLLATION 的输出包括所有可用的排序规则。LIKE 子句(如果存在)指示要匹配的排序规则名称。WHERE 子句可以使用更一般的条件来选择行。

语法结构

  1. > SHOW COLLATION
  2. [LIKE 'pattern' | WHERE expr]

示例

  1. mysql> show collation;
  2. +-------------+---------+------+----------+---------+
  3. | Collation | Charset | Id | Compiled | Sortlen |
  4. +-------------+---------+------+----------+---------+
  5. | utf8mb4_bin | utf8mb4 | 46 | Yes | 1 |
  6. +-------------+---------+------+----------+---------+
  7. 1 row in set (0.00 sec)
  8. mysql> show collation like '%';
  9. +-------------+---------+------+----------+---------+
  10. | Collation | Charset | Id | Compiled | Sortlen |
  11. +-------------+---------+------+----------+---------+
  12. | utf8mb4_bin | utf8mb4 | 46 | Yes | 1 |
  13. +-------------+---------+------+----------+---------+
  14. 1 row in set (0.00 sec)
  15. mysql> show collation where 'Charset'='utf8mb4';
  16. +-------------+---------+------+----------+---------+
  17. | Collation | Charset | Id | Compiled | Sortlen |
  18. +-------------+---------+------+----------+---------+
  19. | utf8mb4_bin | utf8mb4 | 46 | Yes | 1 |
  20. +-------------+---------+------+----------+---------+
  21. 1 row in set (0.00 sec)