Beto Siahaan Beto Siahaan - 7 months ago 37
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;
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download