update fields with a prefix - ?? how to

update fields with a prefix - ?? how to

am 19.10.2009 16:56:47 von lejeczek

dear all, a novice here
quickie regarding query syntax - is it possible to take fields values
from one column
and update the same column with new values like this: prefix_OldValue
column: one, two, three -> column: prefix_one, prefix_two, ...
can this be done with one query and with on use of abstractions, no php
or similar scripting techincs?

cheers, lejeczek

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org

Re: update fields with a prefix - ?? how to

am 19.10.2009 17:03:26 von Johan De Meersman

--0016e6d58cb239c5f304764b0c76
Content-Type: text/plain; charset=ISO-8859-1

Something in the ilk of
update *table* set *field* = concat("prefix_", *field*) where *condition *
should do the trick.

On Mon, Oct 19, 2009 at 4:56 PM, lejeczek wrote:

> dear all, a novice here
> quickie regarding query syntax - is it possible to take fields values from
> one column
> and update the same column with new values like this: prefix_OldValue
> column: one, two, three -> column: prefix_one, prefix_two, ...
> can this be done with one query and with on use of abstractions, no php or
> similar scripting techincs?
>
> cheers, lejeczek
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: http://lists.mysql.com/mysql?unsub=vegivamp@tuxera.be
>
>


--
That which does not kill you was simply not permitted to do so for the
purposes of the plot.

--0016e6d58cb239c5f304764b0c76--