- 论坛徽章:
- 0
|
原帖由 raullew 于 2007-3-14 07:15 发表
[quote]原帖由 beginner-bj 于 2007-3-12 23:00 发表
update
(select a1 from a,b where a.p1 = b.p1 and a.p2 = b.p2) c
set a1=1
也不行吗?
我是觉得写sql要尽量避免in表之类的
试了不行。
db2 => update (select a1 from a,b where a.p1 = b.p1 and a.p2 = b.p2) c set a1=1
DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0150N The target fullselect, view, typed table, materialized query table,
or staging table in the INSERT, DELETE, UPDATE, or MERGE statement is a target
for which the requested operation is not permitted. SQLSTATE=42807 |
|