Mysql && Oracle 中文数字排序

mysql
order by code REGEXP '^[0-9]',CONVERT(code USING gbk),cast( code REGEXP ('-?[0-9]+') AS unsigned INT )

oracle
order by REGEXP_SUBSTR( code,'[[:alpha:]]+'),
cast( REGEXP_SUBSTR(code,'-?[0-9]+') AS INT ) 
posted @ 2022-09-14 15:31  鲸鱼zhang  阅读(70)  评论(0编辑  收藏  举报