views:

133

answers:

1

I have a mysql table with about 1000 rows in it.

id column
1  apple
2  banana
...
etc

I need a mysql query (UPDATE) to wrap (prefix & suffix) all values in a column with a specific string, let's say "_", so I am expecting a result:

id column
1  _apple_
2  _banana_
...
etc

How to do that? Please, advice.

+3  A: 
update table
set column = concat('_', column, '_');
Zed
Thanks alot!!! That's exactly what I want.
Ken
You are welcome :)
Zed