当前位置: 代码迷 >> Sql Server >> 生成数目字+英文字母大小写彩虹字符集(6位),共有62^6种可能
  详细解决方案

生成数目字+英文字母大小写彩虹字符集(6位),共有62^6种可能

热度:157   发布时间:2016-04-24 08:45:04.0
生成数字+英文字母大小写彩虹字符集(6位),共有62^6种可能
--生成数字+英文字母大小写彩虹字符集(6位),共有62^6种可能with cte as (    select number as ascii_no,CHAR(number) as ascii_char    from master..spt_values     where                number between 48 and 57--0-9 ascii            or number between 97 and 122--a-z ascii            or number between 65 and 90--A-Z ascii)  --生成0-9,a(A)-z(Z)字符集合select 彩虹字符,HASHBYTES('md5',彩虹字符) as MD5加密from    (        select         top 1000000 a.ascii_char+b.ascii_char+c.ascii_char+d.ascii_char+e.ascii_char+f.ascii_char as 彩虹字符--100万行        from  cte as a        cross join cte as b        cross join cte as c        cross join cte as d        cross join cte as e        cross join cte as f    ) as c_table