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

Why do select @@session.tx_read_only appear in DB in large quantities?

Find the problem When retrieving the top SQL stat...

CSS HACK for IE6/IE7/IE8/IE9/FF (summary)

Since I installed the official version of IE8.0, ...

How to use video.js in vue to play m3u8 format videos

Table of contents 1. Installation 2. Introducing ...

CSS and CSS3 flexible box model to achieve element width (height) adaptation

1. CSS realizes fixed width on the left and adapt...

Analysis of MySQL user management operation examples

This article describes the MySQL user management ...

Vue recursively implements three-level menu

This article example shares the specific code of ...

Priority analysis of and or queries in MySQL

This may be an issue that is easily overlooked. F...

Solution to MySQL 8.0 cannot start 3534

MySQL 8.0 service cannot be started Recently enco...

MySQL extracts Json internal fields and dumps them as numbers

Table of contents background Problem Analysis 1. ...

How does MySQL ensure data integrity?

The importance of data consistency and integrity ...

A detailed explanation of the subtle differences between Readonly and Disabled

Readonly and Disabled both prevent users from chan...

How to deploy Node.js with Docker

Preface Node will be used as the middle layer in ...

JavaScript to achieve text expansion and collapse effect

The implementation of expanding and collapsing li...

Two problems encountered when deploying rabbitmq with Docker

1. Background The following two problems are enco...