Generate numbers + English letters in upper and lower case Rainbow character set (6 digits). There are 62 ^ 6 possibilities _ MySQL

Source: Internet
Author: User
-- Generate numbers + English letters in upper and lower case Rainbow character set (6 digits). There are 62 ^ 6 possible withcteas (selectnumberascii_no, CHAR (number) asasascii_charfrommaster... spt_valueswhere... Generate numbers + English letters in upper and lower case Rainbow character set (6 digits). There are 62 ^ 6 possibilities _ MySQL

-- Generate numbers + English letters in upper and lower case Rainbow character set (6 digits). There are 62 ^ 6 possibilities 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) -- generate 0-9, a () -z (Z) character set is combined with select rainbow character, HASHBYTES ('md5', Rainbow character) as md5 encrypted from (select top 1000000. ascii_char + B. ascii_char + c. ascii_char + d. ascii_char + e. ascii_char + f. ascii_char as Rainbow character -- Row 1 million 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

The above code is used to generate numbers + English letters and lowercase rainbow character set (6 digits). There are 62 ^ 6 possible _ MySQL content. For more information, see PHP Chinese website (www.php1.cn )!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.