How to replace String in Text with SQL

Knowledge Base Entry: #155
^Top
<< Back
Mobile-Menu










How to replace String in Text with SQL
Category: MySQL/Snippets
Author: Bugfish
Created at: 2021-11-30 17:22:34
Modified at: 2025-09-19 17:31:56
Directs Hits: 537

Here is an example how to replace for example the string "https://test.de/testthis/" with "https://newlink.de/testthis/".

The code is:

UPDATE tablenamehere
SET columnname = REPLACE(columnname , 'test.de', 'newlink.de');

Caution: I do not guarantee the reliability of the information given here, the code described on this page is executed at your own risk and in the event of damage or other unforeseeable consequences I am in no way responsible or liable.
This Website is using Session Cookies for Site Functionality.