Combine the four digits in the middle of the phone number into a Number * and four digits into a number.

Source: Internet
Author: User

Combine the four digits in the middle of the phone number into a Number * and four digits into a number.

MySql APIs have functions:

  • INSERT (str, pos, len, newstr)

Returns the str string. Its substring starts from the pos position and is long replaced by the string newstr. If the pos length exceeds the string length, the return value is the original string. If len is longer than other strings, it is replaced by pos. If any parameter is null, the return value is NULL.

Mysql> select insert ('quadratic ', 3, 4, 'wh ');

-> 'Quwhattic'



Use SQL to query SELECT INSERT ('20140901', 13555556226, '*****') AS phoneNum


How to convert the four digits in the middle of the phone number *

Assume that it is an 11-digit mobile phone number.

= CONCATENATE (LEFT (B2, 3), "*****", RIGHT (B2, 4 ))

LEFT (B2, 3) takes the first three digits,
RIGHT (B2, 4) takes the last four digits.

How can I find the four digits in the middle of the first three digits and the last four digits of a mobile phone number, and instruct the Senior User 138 *** 0096

Each code segment, for example, 138, is followed by four numbers indicating the region. You can directly query the code segment 138. If you know the region and iuk maliciously, Baidu will have information, however, it is still difficult to fully determine.
Another point is the four digits in the middle, which are sequential.
Good luck

Related Article

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.