Mask specified number of column characters beginning at right.

Syntax

/*+  MASK_LAST(column [, length]) */

Arguments

  • column - name of table column.
  • length - total number of characters to mask, starting at right. Default length is 3.

Examples

SELECT MASK_LAST(surname), * FROM widgetcorp.sales.accounts.customers;

| RESULTS | id | name | surname | email |
|---|---|---|---|---|
| gXXX | 39772 | eddie | gaff | egaff@lapd2019.gov |
| holXXX | 23381 | dave | holden| holden.d@turtle.com |
| deckXXX | 26354 | rick | deckard | rick@unicorn.co |

SELECT MASK_LAST(surname, 5), * FROM widgetcorp.sales.accounts.customers;

| RESULTS | id | name | surname | email |
|---|---|---|---|---|
| XXXX | 39772 | eddie | gaff | egaff@lapd2019.gov |
| hXXXXX | 23381 | dave | holden | holden.d@turtle.com |
| deXXXXX | 26354 | rick | deckard | rick@unicorn.co |