日期:2014-05-18  浏览次数:20643 次

update更新用select语句得来的结果集,要如何写语句?急
比如 select a.one,b.one where a.id=b.id

现在我要更新用上述语句得到的结果?

如何写update语句?

------解决方案--------------------
探讨
SQL code
update t set one=b.one from a t where t.id=b.id

------解决方案--------------------
SQL code
update t set t.one=b.one from a t,b where t.id=b.id

------解决方案--------------------
探讨
比如 select a.one,b.one where a.id=b.id

现在我要更新用上述语句得到的结果?

如何写update语句?

------解决方案--------------------
探讨
貼出來:
SELECT bms_jobs
FROM boms LEFT OUTER JOIN part ON boms.bms_pno = part.part_no where bms_bomsno in (1272,1273,1311,1312,1314,1315,1317,1318,1320,1321,1323,1324,1326,1327,1329,1330,2922,2923,2925……

把查出來的記錄的bms_jobs清空