【数据库】mysql、oracle、sqlserver按照字典顺序

MySQL

按照字典顺序排序:

ORDER BY CONVERT(xxx USING gbk)

ORACLE

按照字典顺序排序:

nlssort(xxx,'NLS_SORT=SCHINESE_PINYIN_M');

按照笔画排序:

nlssort(xxx,'NLS_SORT=SCHINESE_STROKE_M');

按照部首排序:

nlssort(xxx,‘NLS_SORT=SCHINESE_RADICAL_M’);

SQLServer

按照字典顺序排序:

ORDER BY  xxx COLLATE CHINESE_PRC_CI_AS;

    原文作者:sailor_studio
    原文地址: https://blog.csdn.net/sailor_studio/article/details/124383602
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞