MySQL SQL statement method to hide the middle four digits of the mobile phone number

MySQL SQL statement method to hide the middle four digits of the mobile phone number

First query table structure (sys_users):

SELECT * from sys_users;


The first method: Hide the middle four digits of the mobile phone number

select REPLACE(mobile, SUBSTR(mobile,4,4), 'XXXX') from sys_users


The second method: Hide the middle four digits of the mobile phone number (recommended)

select insert(mobile, 4, 4, 'XXXX') from sys_users;


The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

You may also be interested in:
  • AngularJs custom filter to hide mobile phone number information
  • C# uses regular expressions to hide the middle four digits of the mobile phone number as *
  • How to replace the middle digits of a mobile phone number with * and hide the last few digits of an IP address using PHP
  • C# implementation method of hiding sensitive information such as mobile phone number and email address
  • PHP implements a custom function to hide the middle four digits of a mobile phone number with asterisks (*)
  • PHP uses asterisks to hide part of the user name, ID card, IP, mobile phone number, etc.
  • Regular expression to hide the middle 4 digits of the mobile phone number or only display the last 4 digits

<<:  Vue project @change multiple parameters to pass multiple events

>>:  Example of how to set WordPress pseudo-static in Nginx

Recommend

Sample code for implementing a background gradient button using div+css3

As the demand for front-end pages continues to in...

Detailed tutorial on installing and using Kong API Gateway with Docker

1 Introduction Kong is not a simple product. The ...

HTTPS Principles Explained

As the cost of building HTTPS websites decreases,...

Some notes on mysql create routine permissions

1. If the user has the create routine permission,...

How to use Nginx to carry rtmp live server

This time we set up an rtmp live broadcast server...

A brief description of the relationship between k8s and Docker

Recently, the project uses kubernetes (hereinafte...

How to develop uniapp using vscode

Because I have always used vscode to develop fron...

Detailed explanation of 4 common data sources in Spark SQL

Generic load/write methods Manually specify optio...

Execute the shell or program inside the Docker container on the host

In order to avoid repeatedly entering the Docker ...

Detailed explanation of Apache website service configuration based on Linux

As an open source software, Apache is one of the ...

Implementing image fragmentation loading function based on HTML code

Today we will implement a fragmented image loadin...

Detailed explanation of the solution to image deformation under flex layout

Flex layout is a commonly used layout method nowa...

Detailed tutorial of pycharm and ssh remote access server docker

Background: Some experiments need to be completed...