//在数据库中 这个字段是多个值 例如 td:84,85.然追加(除去已有的) UPDATE tablename SET td=concat(td ,',84') WHERE newlpid='58' AND id not in ( SELECT a.id from (SELECT id FROM tablename WHERE newlpid='58' AND td LIKE '%84%') as a) //在数据库中 这个字段是多个值 替换某个值。例如 td:84,85,要按顺序进行替换。 UPDATE tablename SET td=replace(td,'46,','') WHERE td LIKE '%46%' UPDATE tablename SET td=replace(td,',46','') WHERE td LIKE '%46%' UPDATE tablename SET td=replace(td,'46','') WHERE td LIKE '%46%'
by: 发表于:2017-09-22 09:45:08 顶(0) | 踩(0) 回复
??
回复评论