I need to mask the data in the following table. enter image description here

For example, I need to mask the first_name of the user Roberto to something like NAME<<userID>>, So the end result should look like NAME1

Is this possible in SQL Server?

My SQL Server details below.

enter image description here

I have tried these methods from the documentation but still no luck from documentation

1 Answer 1


You cannot refer to data in some other column so if that 1 should come from the MemberId column, then you are out of luck. What you have to play with are the prefix and suffix, and those need to be from the same column as the masking is defined on.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.