How to replace nth character in sql server

use stuff
The STUFF function inserts a string into another string. It deletes a specified length of characters in the first string at the start position and then inserts the second string into the first string at the start position.

select STUFF(ABC, starting_index, 1, 'X') from XXX

“Here your int position to replace” is the position no just replace with any int no and that position will be replaced
Note : (Thanks to pcnate for suggestion)
starting_index is your int position to replace.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)