I have a data base with over 20000 rows of data. I would like to change about 1000 rows of data in the table but do not know how to do this without deleting all the other table data. I was trying to use the UPDATE command but I keep getting errors. Can someone take a look at the two databases I have attached and let me know what commands to use in the new.txt database so I can upload it to my server without altering all the other data.
In summary, Im tring to update the old.sql with the new info in new.sql without changing all the unaffected files.
Your update statement is incorrect. it should have the form
set [column_to_update1] = newValue1,
[column_to_update2] = newValue2,
[column_to_update3] = newValue3
where id = [some_id]
SET song = 'Roll It Gal',
WHERE id = 46449
You would have to create the above statement 1000 times for each row of data that you are updating.
There are some other ways, but they may be a little more complicated, and pruned to error if not fully understood. If you are going to be doing something like this on a regular basis, with large amounts of then I can make other suggestions.
I would post a link to the MySQL reference documents, but as a new member I don't believe I can.
Last edited by stahightech; 10-31-2009 at 09:47 AM.
Reason: Syntax Error in the solution