用户名是由拼音字母加数字组合成的吗
- 提问者网友:聂風
- 2021-01-31 14:48
- 五星知识达人网友:老鼠爱大米
- 2021-01-31 15:48
- 1楼网友:雾月
- 2021-01-31 16:01
看看这个
http://dhjdhja.blog.163.com/blog/static/647211362009101684639346/
ps:奶奶的贴一个地址链接还不行
什么破论坛,内容又发不完
--sql汉字转拼音 set ansi_nulls on go
set quoted_identifier on go
create function [dbo].[fn_getpinyin](@words nvarchar(2000)) returns varchar(8000) as begin declare @word nchar(1) declare @pinyin varchar(8000) declare @i int declare @words_len int declare @unicode int set @i = 1 set @words = ltrim(rtrim(@words)) set @words_len = len(@words) while (@i <= @words_len) --循环取字符 begin set @word = substring(@words, @i, 1) set @unicode = unicode(@word) set @pinyin = isnull(@pinyin+space(1),'')+ (case when unicode(@word) between 19968 and 19968+20901 then (select top 1 py from ( select 'a' as py,n'厑' as word union all select 'ai',n'靉' union all select 'an',n'黯' union all select 'ang',n'醠' union all select 'ao',n'驁' union all select 'ba',n'欛' union all select 'bai',n'瓸' --韛兡瓸 union all select 'ban',n'瓣' union all select 'bang',n'鎊' union all select 'bao',n'鑤' union all select 'bei',n'鐾' union all select 'ben',n'輽' union all select 'beng',n'鏰' union all select 'bi',n'鼊' union all select 'bian',n'變' union all select 'biao',n'鰾' union all select 'bie',n'彆' union all select 'bin',n'鬢' union all select 'bing',n'靐' union all select 'bo',n'蔔' union all select 'bu',n'簿' union all select 'ca',n'囃' union all select 'cai',n'乲' --縩乲 union all select 'can',n'爘' union all select 'cang',n'賶' union all select 'cao',n'鼜' union all select 'ce',n'簎' union all select 'cen',n'笒' union all select 'ceng',n'乽' --硛硳岾猠乽 union all select 'cha',n'詫' union all select 'chai',n'囆' union all select 'chan',n'顫' union all select 'chang',n'韔' union all select 'chao',n'觘' union all select 'che',n'爡' union all select 'chen',n'讖' union all select 'cheng',n'秤' union all select 'chi',n'鷘' union all select 'chong',n'銃' union all select 'chou',n'殠' union all select 'chu',n'矗' union all select 'chuai',n'踹' union all select 'chuan',n'鶨' union all select 'chuang',n'愴' union all select 'chui',n'顀' union all select 'chun',n'蠢' union all select 'chuo',n'縒' union all select 'ci',n'嗭' --賜嗭 union all select 'cong',n'謥' union all select 'cou',n'輳' union all select 'cu',n'顣' union all select 'cuan',n'爨' union all select 'cui',n'臎' union all select 'cun',n'籿' union all select 'cuo',n'錯' union all select 'da',n'橽' union all select 'dai',n'靆' union all select 'dan',n'饏' union all select 'dang',n'闣' union all select 'dao',n'纛' union all select 'de',n'的' union all select 'den',n'扽' union all select 'deng',n'鐙' union all select 'di',n'螮' union all select 'dia',n'嗲' union all select 'dian',n'驔' union all select 'diao',n'鑃' union all select 'die',n'嚸' --眰嚸 union all select 'ding',n'顁' union all select 'diu',n'銩' union all select 'dong',n'霘' union all select 'dou',n'鬭' union all select 'du',n'蠹' union all select 'duan',n'叾' --籪叾 union all select 'dui',n'譵' union all select 'dun',n'踲' union all select 'duo',n'鵽' union all select 'e',n'鱷' union all select 'en',n'摁' union all select 'eng',n'鞥' union all select 'er',n'樲' union all select 'fa',n'髮' union all select 'fan',n'瀪' union all select 'fang',n'放' union all select 'fei',n'靅' union all select 'fen',n'鱝' union all select 'feng',n'覅' union all select 'fo',n'梻' union all select 'fou',n'鴀' union all select 'fu',n'猤' --鰒猤 union all select 'ga',n'魀' union all select 'gai',n'瓂' union all select 'gan',n'灨' union all select 'gang',n'戇' union all select 'gao',n'鋯' union all select 'ge',n'獦' union all select 'gei',n'給' union all select 'gen',n'搄' union all select 'geng',n'堩' --亙堩啹喼嗰 union all select 'gong',n'兣' --熕贑兝兣 union all select 'gou',n'購' union all select 'gu',n'顧' union all select 'gua',n'詿' union all select 'guai',n'恠' union all select 'guan',n'鱹' union all select 'guang',n'撗' union all select 'gui',n'鱥' union all select 'gun',n'謴' union all select 'guo',n'腂' union all select 'ha',n'哈' union all select 'hai',n'饚'