How to concatenate text on existing database entry?
Posted
by Starx
on Stack Overflow
See other posts from Stack Overflow
or by Starx
Published on 2010-05-27T05:40:46Z
Indexed on
2010/05/27
6:11 UTC
Read the original article
Hit count: 178
I have a table, whose fields are
id, name, link
the link holds the name of the page like "link" = "index.php". Now I want to update this field and add "page=" in front of "index.php". Using this method I would like to update every entry in my table.
My desired SQL syntax need to be something like this
UPDATE mytable set link= 'page=' + <existing value of link> WHERE 1;
I am using 'WHERE 1;' to denote every row.
Anyone know how to accomplish this?
© Stack Overflow or respective owner