# mysql 的修改方法update table_a a inner join table_b b on b.id=a.id set a.description=b.content;# mssql的修改方法update a set a.description=b.content from table_a a inner join table_b b on a.id=b.id;
将两个字段的值合并起来赋给其中的一个值
表a: column1 column2 a1 b1 a2 b2 a3 b3 a4 b4 表c: column1 column2 a1 c1 a2 c2 a3 c3 a4 c4 要求更改表b为: column1 column2 a1 c1.b1 a2 c2.b2 a3 c3.b3 a4 c4.b4 # access 的修改方法
update b INNER JOIN c on b.column1 = c.column1 set b.column2 = c.column2 & '.' & b.column2;
# mysql 的修改方法
update b INNER JOIN c on b.column1 = c.column1 set b.column2 = c.column2 + '.' + b.column2;
# mssql 的修改方法
update b set b.column2 = c.column2 + '.' + b.column2 from b inner join c on b.column1=c.column1;
# oracle 的修改方法
update B b1 set column2 = ( select b2.column2 || '.' || c1.column2 from B b2, C c1 where b1.column1 = b2.column1 and b2.column1=c1.column1)