方法1:
select min(c) from (select min(b) as c from tab_name union select min(a) as c from tab_name);
方法2:
select least(min(A),min(B)) from table;
least(...),greatest(...)中如果含有null的话,无法得到结果 select greatest(max(A),max(B)) from table;
2023-10-27 10:42:58
方法1:
select min(c) from (select min(b) as c from tab_name union select min(a) as c from tab_name);
方法2:
select least(min(A),min(B)) from table;
least(...),greatest(...)中如果含有null的话,无法得到结果 select greatest(max(A),max(B)) from table;