tags:

views:

68

answers:

1

i will be importing a table with data. one of the columns called CAR will look something like this:

mercedes,ford,toyota

for every record in the DB i will need to add a comma , to the end of the string like:

mercedes,ford,toyota,

since i will be programmatically importing the table, what is the best way to add this trailing comma to every record?

+2  A: 

to update every record in a single UPDATE, try:

UPDATE YourTable SET CAR=CAR & ","

to update only a certain row try:

UPDATE YourTable SET CAR=CAR & "," WHERE {{some condition here, like ID=12}}
KM