How to concatinate 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 5:41 UTC
Read the original article Hit count: 188

Filed under:
|
|

I am a table, whose structure is somewhat like this

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 other rows

Anyone know what to accomplish this?

© Stack Overflow or respective owner

Related posts about mysql

Related posts about mysql-query