explorer1979
IS-IT--Management
- May 16, 2011
- 9
Hi all,
I have some value in the Database that need to update, but I don't know how to write the SQL code.
MySQL Database named "abc"
Have a table named "products" in the above database "abc"
In the table 'products" have "products_id", products_model", "manufacturers_id" three column
I want to change some value in the "products_model" that base on manufacturers_id's value is 11
For example of the value in products_model are list below
000160
000175
002358
002419
00185600
00589000
My problems is how to using SQL to update the above value on products_model with manufacturers_id=11 that the format I want below.
000160 --> EK000160
000175 --> EK000175
002358 --> EK002358
002419 --> EK002419
00185600 --> EK00185600
00589000 --> EK00589000
I am new on using SQL to update data, but I hope can do like that.
Anyone can tell me how to write the SQL for above case?
Thank you very much of your time and kindly help.
I have some value in the Database that need to update, but I don't know how to write the SQL code.
MySQL Database named "abc"
Have a table named "products" in the above database "abc"
In the table 'products" have "products_id", products_model", "manufacturers_id" three column
I want to change some value in the "products_model" that base on manufacturers_id's value is 11
For example of the value in products_model are list below
000160
000175
002358
002419
00185600
00589000
My problems is how to using SQL to update the above value on products_model with manufacturers_id=11 that the format I want below.
000160 --> EK000160
000175 --> EK000175
002358 --> EK002358
002419 --> EK002419
00185600 --> EK00185600
00589000 --> EK00589000
I am new on using SQL to update data, but I hope can do like that.
Anyone can tell me how to write the SQL for above case?
Thank you very much of your time and kindly help.