'How to replace ST. MARY’S with ST. MARY'S

I've varchar string stored in MYSQL Database ; I want to replace all ST. MARY’S with ST. MARY'S . If you notice there is difference of and '.



Solution 1:[1]

The REPLACE function will replace one string with another.

UPDATE YourTable
SET name = REPLACE(name, "’", "'");

Solution 2:[2]

UPDATE YourTable
SET name = "ST. MARY'S"
WHERE name = "ST. MARY’S"

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Barmar
Solution 2 starko