yana
Posts: 11
|
| Posted: 07/23/2007, 11:47 PM |
|
helo...
I have a table with about 2000 data.
I would like to update all the data.
original data:
salma
james
chua
marry
I want to update all the data by adding '/1' at the end of every data. example:
salma/1
james/1
chua/1
marry/1
the idea is using the 'update' syntax but I don't clearly know how to do it. Is anyone out there can help me?
|
 |
 |
mamboBROWN
Posts: 1713
|
| Posted: 07/24/2007, 4:01 PM |
|
yana
Here is a query that you can use:
update TableNameHere set FieldName=concat(FieldName,"/1")
TableNameHere - Whatever the table name is
FieldName - Whatever the name of the field is that you want to add /1 to.
NOTE: If you are new to MySQL I would suggest downloading thier CHM for MySQL it is a good reference to have for occassions like this.
|
 |
 |
yana
Posts: 11
|
| Posted: 07/24/2007, 9:22 PM |
|
mamboBROWN
thanx a lot!!! the query run successfully. thanks for your help and advice
|
 |
 |
mamboBROWN
Posts: 1713
|
| Posted: 07/25/2007, 8:44 PM |
|
yana
No problem. Glad I could be of assistance.
|
 |
 |