content_image/732553.jpg
For example, a masking view on the customer  table from the previous section can be defined like this: 

CREATE VIEW masked_customer AS SELECT id, first_name, last_name, mask_ssn(CONVERT(ssn USING binary)) AS masked_ssn FROM customer; 

Then the query to look up a customer becomes simpler but still returns masked data: 

mysql> SELECT id, masked_ssn mysql> FROM masked_customer mysql> WHERE first_name = ’Joanna’ AND last_name = ’Bond’; +-----+-------------+ | id | masked_ssn | +-----+-------------+ | 786 | XXX-XX-0007 | +-----+-------------+ 

## 6.5.4 MySQL Enterprise Data Masking and De-Identification Function Reference 

<img src='content_image/732553.jpg'>

