SQL Server 2012 and 2014 supports IIF(cont,true,false) function. Thus for minimal selection you can use it like
SELECT IIF(first>second, second, first) the_minimal FROM table
While IIF is just a shorthand for writing CASE...WHEN...ELSE
, it's easier to write.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…