update一个表中的一个字段,但是需要从另外一个表中取数据。
比如:
update tableA,tableB
set a.X=1 (x为一个字段)
where a.Y=b.Y (y为一个字段,tableA和tableB中都有这个字段。) 这个语句对马?请指点。多谢了。
比如:
update tableA,tableB
set a.X=1 (x为一个字段)
where a.Y=b.Y (y为一个字段,tableA和tableB中都有这个字段。) 这个语句对马?请指点。多谢了。
调试欢乐多
where exists(select 1 from tableB b where a.Y=b.Y)
update measure
set measure.sent=1
where exists(select 1 from dptitem where measure.dptcd=dptitem.dptcd)在运行pl/sql中的command窗口运行不了!
where exists(select 1 from tableB b where a.Y=b.Y)
后面的条件可能要变化