I'm having a really hard time figuring out how to replace a special character with another in SQL (MySQL syntax). I've already tried with REPLACE function without success. What I would like to do is:

**From this string:**

```
"C:\foo\bar\file.txt"

```

**Obtain this string:**

```
"C:\\foo\\bar\\file.txt"

```