Click to See Complete Forum and Search --> : mysql update help.


izlik
10-29-2007, 09:47 PM
Hello.

Im running a gaming website where each game has the possibility to have keywords added to them. insteed of updating 2300 rows manually i was wondering if it is possible to somehow run a query that update the collumn "keyword" for all rows in the table, with what is writen in the row "name" in the same table ?

i want it to copy the text on each row on the collumn "name" for and copy it into each row for the collumn "keyword" for all 2300 rows. kinda like copy paste!

how it looks like

Name: horde jumping
Keyword:

what i want it

Name: horde jumping
Keyword: horde jumping

BrainDonor
10-30-2007, 10:09 AM
try this:

update table_name
set keyword = name
where keyword is null or keyword = ' '