如何根据A表查询的结果更新B表数据
A
字段1 字段2 字段3
a er 2
b 34 we
c 34 e
d 34 tB
字段1 字段2 字段3 字段4
b 34 we 0如何查询,当A表字段1的b的“we”变成“ew”后,就更新B表字段4变成1
这个更新语句应该如何写呢?
A
字段1 字段2 字段3
a er 2
b 34 we
c 34 e
d 34 tB
字段1 字段2 字段3 字段4
b 34 we 0如何查询,当A表字段1的b的“we”变成“ew”后,就更新B表字段4变成1
这个更新语句应该如何写呢?
解决方案 »
- 为什出错 给高分
- mysql5 存储过程运行期间是否会根据实际情况部分重编译
- C++ 连接 mysql 有什么比较好用的库吗?
- sqlserver 语句转 mysql 语句问题
- 为什么使用分区功能会被注释掉?
- 存储过程中怎么产生随机表名?
- errot 2003: cannot connect to mysql server on 'localhost' <10061>
- 哪位高手熟悉mysql
- Mysql查询 排序 分页
- 求助mysql存储过程中输出参数赋值问题
- 急急急!!请问references sort(id) on delete cascade 产生了错误,要怎么解决?
- ERROR 1030: Got error 127 from table handler
for update
as
update b
set 字段4=1
from inserted i join b on reverse(i.字段3)=b.字段3
where exists(select 1 from deleted d where d.字段3=reverse(i.字段3))