Oracle Data Masking using TRANSLATE function
Data Masking
----------------
update hr.employees set FIRST_NAME = translate( FIRST_NAME, 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ','prqstlmnouvwxyzabcdefghijkPRQSTLMNOUVWXYZABCDEFGHIJK'),
LAST_NAME = translate( LAST_NAME, 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ','prqstlmnouvwxyzabcdefghijkPRQSTLMNOUVWXYZABCDEFGHIJK');
The above data masking actions can be reverted using below step
update hr.employees set FIRST_NAME = translate( FIRST_NAME, 'prqstlmnouvwxyzabcdefghijkPRQSTLMNOUVWXYZABCDEFGHIJK','abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'),
LAST_NAME = translate( LAST_NAME, 'prqstlmnouvwxyzabcdefghijkPRQSTLMNOUVWXYZABCDEFGHIJK','abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ');