Skip to main content

DIGITAL_MASKING

Description

The digital_masking function is used for masking numbers. Based on the specified masking rule, certain characters in the number are replaced with *. This function is an alias for the original function concat(left(id, 3), '****', right(id, 4)).

Syntax

DIGITAL_MASKING( <digital_number> )

Parameters

ParameterDescription
<digital_number>The digital string that needs to be masked

Return Value

Returns the masked digital string.

Examples

select digital_masking(13812345678);
+------------------------------+
| digital_masking(13812345678) |
+------------------------------+
| 138****5678 |
+------------------------------+