得到表中两个字段中,其中一个最大的值
select (case when c.a>c.b then c.a else c.b end) as MaxTime from (SELECT MAX(字段1) as a ,MAX(字段2) as b FROM [表] ) as c
执行完成之后得到最大的值
得到表中两个字段中,其中一个最大的值
select (case when c.a>c.b then c.a else c.b end) as MaxTime from (SELECT MAX(字段1) as a ,MAX(字段2) as b FROM [表] ) as c
执行完成之后得到最大的值
转载于:https://www.cnblogs.com/cfss/p/MaxTime.html