SQL语句把某一列的所有值前面加一个前缀

更新 (为该列的值加上固定前缀-修改数据库数据表):

 update car_koubei_details set series_id=concat('sb_',series_id) where id=146467;
"""
 update table set column=concat('exp_',column) where id=146467;
"""

查询加上前缀(不修改数据库):

 select *,concat('wz',column1) as column1 from table where column='xx'

你可能感兴趣的:(SQL语句把某一列的所有值前面加一个前缀)