information_schema.collations 学习

information_schema.collations 表中的每一行对应一个排序规则

1、information_schema.collations 表中学用列:

  1、id                  :排序规则的ID

  2、is_default              :是否是字符集的默认排序规则

  3、collation_name            :排序规则名

  4、character_set_name          :这个排序规则所对应的字符集名字

  5、is_compiled             :是不已经被编译进MySQL来了

 

2、例子:

查看实例的排序规则信息

select 
    id,
    is_default,
    collation_name,
    character_set_name,
    is_compiled,
    sortlen
from 
    information_schema.collations

order by id;


+-----+------------+--------------------------+--------------------+-------------+---------+
| id  | is_default | collation_name           | character_set_name | is_compiled | sortlen |
+-----+------------+--------------------------+--------------------+-------------+---------+
|   1 | Yes        | big5_chinese_ci          | big5               | Yes         |       1 |
|   2 |            | latin2_czech_cs          | latin2             | Yes         |       4 |
|   3 | Yes        | dec8_swedish_ci          | dec8               | Yes         |       1 |
|   4 | Yes        | cp850_general_ci         | cp850              | Yes         |       1 |
|   5 |            | latin1_german1_ci        | latin1             | Yes         |       1 |
|   6 | Yes        | hp8_english_ci           | hp8                | Yes         |       1 |
|   7 | Yes        | koi8r_general_ci         | koi8r              | Yes         |       1 |
|   8 | Yes        | latin1_swedish_ci        | latin1             | Yes         |       1 |
|   9 | Yes        | latin2_general_ci        | latin2             | Yes         |       1 |
|  10 | Yes        | swe7_swedish_ci          | swe7               | Yes         |       1 |
|  11 | Yes        | ascii_general_ci         | ascii              | Yes         |       1 |
|  12 | Yes        | ujis_japanese_ci         | ujis               | Yes         |       1 |
|  13 | Yes        | sjis_japanese_ci         | sjis               | Yes         |       1 |
|  14 |            | cp1251_bulgarian_ci      | cp1251             | Yes         |       1 |
|  15 |            | latin1_danish_ci         | latin1             | Yes         |       1 |
|  16 | Yes        | hebrew_general_ci        | hebrew             | Yes         |       1 |

 

posted on 2016-08-20 21:40  蒋乐兴的技术随笔  阅读(475)  评论(0编辑  收藏  举报

导航