Beto Siahaan Beto Siahaan - 2 months ago 14
SQL Question

SQL replace all columns with the same 2xstring

I want to replace all columns with the same string twice, for example

string1 : string1string1
string2 : string2string2
string3 : string3string3
string4 : string4string4

I only know the basic replace:

update table set column = replace(column,"oldstring","newstring");

Answer Source

Depending on your database one of these queries should work:

update table set column =  concat(column,column);


update table set column =  column || column;