Given table has debit card numbers. I want to write a code to mask the debit card numbers in which the middle 4 numbers are replaced with X. The table is as follows:
I want the following output:
I have written the following code but it is giving errors:
UPDATE
Debit_card_master
SET
Debit_card = LEFT(Debit_card, 4) + REPLICATE(‘x’, 4) + RIGHT(Debit_card, 4) ;
Also, can anyone help me with the correct MySQL code for the same?


||for string concatenation. Voting to close as a typo.