两条sql就可以了
思路:1,现在defaultpic中写添加的sql
2,然后在另一个表中删除该字段就可以了
update 表名 set a=a+(select b from 表名 where b='们' group by b) where a='我'
或
update 表名 set a=a+b where a='我' and b='们'
如果还想insert那么,你的意思不太明确。就正常就可以了。
你是想新插入的字段也自动按这个规则变化的话,就做个触发器就好了。
--如果是在两表之间实现,则是如下代码
update 表1 set 表1.字段A=表1.字段A+(select 表2.字段B from 表2 where 表1.Id=表2.Id)
UPDATE tableA SET tableA.A= tableB.B WHERE tableA.id=tableB.id
试试吧。
update 表 set A=A+B