首页 >数据库 >mysql教程 >生成数字+英文字母大小写彩虹字符集(6位),共有62^6种可能_MySQL

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

PHP中文网
PHP中文网原创
2016-05-27 19:11:411441浏览

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

--生成数字+英文字母大小写彩虹字符集(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

以上就是生成数字+英文字母大小写彩虹字符集(6位),共有62^6种可能_MySQL的内容,更多相关内容请关注PHP中文网(www.php.cn)!


声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn