我有这样的mysql表。
table_categories - scid, scname, scimage
我想将每行的scimage字段更新为“/images/subcategories/"scid".png”
update table_categories set scimage = "/images/subcategories/" + <What should i write here, so it take scid value> + ".png"
答案 0 :(得分:0)
只需将您的列名称写为:
update table_categories set scimage = "/images/subcategories/" + scid + ".png"
如果您的列类型不是varchar,则必须convert your datatype at the first。