I have importing table in my database. This table columns are product_id and ext_product_id. Product_id is unique, but ext_product_id in table has same. I have to update this multiple ext_product_id. My table has thousands of columns. I can't manualy update these rows.
my table foramt is:
product_id ext_product_id 44 796666 45 796666 46 796666 306 1275631 308 1275631 309 1275631 . . i have table foramt like this:
my table foramt is: product_id ext_product_id 44 796666 45 796667 46 796668 306 1275631 308 1275632 309 1275633 . . How to update this ?
My query only works with a single record:
update 13_product_id set ext_product_id='796667' where product_id='45'; I have to update multiple rows, please give me a suggestion.
product_id='45'WHEREclause, if you want to update all records. If you want to updated only some rows ,then list them in theINclause.