update table a set a.placeOnPer=‘李琳‘ where placeOnPer in(
select min(placeOnPer) from (
select * from table where placeOnPer=‘李琳‘
) as a group by placeOnPer
);
update table c
set c.location=‘xxx‘ where c.guid in
select max(guid) from ( select a.guid from table a,table2 b where a.infoid=b.guid and b.placeOnPer=‘李琳‘) as a group by guid )
时间: 2024-08-15 00:46:56