--获取一张表中某个字段最大值的一条记录
select * from service_item a
where service='20039700100698845113440400' and
version=(select max(b.version)
from service_item b
where a.service = b.service
);
select * from service_item a
where service='20039700100698845113440400' and
version=(select max(b.version)
from service_item b
where a.service = b.service
);
本文介绍了一种SQL查询方法,用于从指定的服务项表中选取具有最大版本号的记录。此方法首先确定目标服务的最大版本号,然后返回与此版本号对应的完整记录。
1779

被折叠的 条评论
为什么被折叠?



