-------查询物理版本最大并且去除业务版本的重复-------
select a.*
from ecm02 a,
(select BUSINESS_VER, max(PHYSICAL_VER) PHYSICAL_VER
from ecm02
where REPOSITORY_NAME='TEST' and
FILE_PATH='_TEST_DEPLOYE_jQueryAPI-100214'
group by BUSINESS_VER) b
where a.BUSINESS_VER = b.BUSINESS_VER
and a.PHYSICAL_VER = b.PHYSICAL_VER
--查询最大physical sql---
select a.*from ecm02 a,(select max(PHYSICAL_VER) PHYSICAL_VER from ecm02
where REPOSITORY_NAME='TEST' and FILE_PATH='_TEST_DEPLOYE_jQueryAPI-
100214')b where a.PHYSICAL_VER = b.PHYSICAL_VER
select a.*
from ecm02 a,
(select BUSINESS_VER, max(PHYSICAL_VER) PHYSICAL_VER
from ecm02
where REPOSITORY_NAME='TEST' and
FILE_PATH='_TEST_DEPLOYE_jQueryAPI-100214'
group by BUSINESS_VER) b
where a.BUSINESS_VER = b.BUSINESS_VER
and a.PHYSICAL_VER = b.PHYSICAL_VER
--查询最大physical sql---
select a.*from ecm02 a,(select max(PHYSICAL_VER) PHYSICAL_VER from ecm02
where REPOSITORY_NAME='TEST' and FILE_PATH='_TEST_DEPLOYE_jQueryAPI-
100214')b where a.PHYSICAL_VER = b.PHYSICAL_VER
本文展示了如何在数据库中查询物理版本的最大值,并去除业务版本的重复项。
7万+

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



