Mask the last 5 characters of any phone number.

Syntax

/*+  MASK_PHONE(column) */

Arguments

  • column - name of table column.

Examples

SELECT MASK_PHONE(phone), * FROM widgetcorp.sales.accounts.customers;

| RESULTS | id |  name | surname | email | phone |
|---|---|---|---|---|---|
| 202-555XXXXX	 | 39772 | eddie | gaff | egaff@lapd2019.gov | 202-555-0157 |
| 202-555XXXXX	 | 23381 | dave | holden | holden.d@turtle.com | 202-555-0161 |
| 202-555XXXXX	 | 26354 | rick | deckard | rick@unicorn.co | 202-555-0139 |