1.第一种方式
select max(t1.INVALID_TIME) from T_CUSTOMER t1 where t1.customer_code = '5101'
1.第二种方式
SELECT INVALID_TIME FROM (SELECT * FROM T_CUSTOMER WHERE customer_code='5101' ORDER BY INVALID_TIME desc) WHERE ROWNUM =1
1.第三种方式
select INVALID_TIME from T_CUSTOMER t where INVALID_TIME=(select max(INVALID_TIME) from T_CUSTOMER where customer_code='5101') and ROWNUM =1
5.不过滤存在多条最大时间
select INVALID_TIME from T_CUSTOMER t wheret.INVALID_TIME = (select max(t1.INVALID_TIME) from T_CUSTOMER t1 where t1.customer_code = '5101')