|
|
Re: Re: 两表连查来更新其中一张表?
这个语句会不会报错?
group by聚组语句,前面的co9unt(*)是不是必须有group by 的条件,就是必须写成select cola_1,count(*) from ...
最初由 yangtingkun 发布
[B]
是不是这样?
update table_a x set cola_3 =
(select count(*) from table_a a, table_b b where a.cola_1 = b.colb_1
and a.cola_1 = x.cola_1
group by a.cola_1) [/B] |
|