如何根据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
这个更新语句应该如何写呢?
解决方案 »
- mysql数据库,命令被拒绝的问题(ERROR 1044: Access denied for user ''@'localhost')
- 请问大虾,windows下MYSQL如何用mysqlhotcopy来备份啊
- 关于Innodb优化上的几个问题
- 随机调用某一栏目若干日以内最新资料的sql语句怎么写?
- mysql的语句快看下咯
- 要把一个图片(JPG或GIF)送进MYSQL,该字段应设何种类型?
- 忙碌一年,准备打包回国,恭祝诸位新年好! 在常来的三个版上散600分
- PostGres 的一些問題. 來者有分.不夠再加!
- **** 这样的嵌套排序的SQL语句应该怎样写?****
- 求助一条sql语句(多字段求和后并排名)
- 急急急!!请问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))