select t.*
from TB_ACC_RULEUNIT_SCM t
where t.ruleunit_scm =
(select max(ruleunit_scm)
from TB_ACC_RULEUNIT_SCM
where ruleunit_id = t.ruleunit_id)
and t.ruleunit_annex_scm =
(select max(ruleunit_annex_scm)
from TB_ACC_RULEUNIT_SCM
where ruleunit_scm = t.ruleunit_scm
and ruleunit_id = t.ruleunit_id)
查询两列对应ID的最大值
最新推荐文章于 2021-01-18 19:38:15 发布