ShawnT
Member since Mar 13, 2015
- Profile: /members/12581-shawnt.htm
- Comments: 2
Recent Blog Comments By ShawnT
-
Using GREATEST(), LEAST(), And Date/Time Values With COALESCE() In MySQL
Posted on Mar 16, 2015 at 2:47 PM
@Ben, When I first read it I thought you were jumping through unnecessary hoops to write two queries against the same table (but different columns) and then finally combining them at the end. (Part of my confusion was the result of reading "/* FROM some_table WHERE some_condition */" as t... read more »
-
Using GREATEST(), LEAST(), And Date/Time Values With COALESCE() In MySQL
Posted on Mar 13, 2015 at 3:48 PM
Isn't it just easier to write this? case when arg1 <= arg2 then arg1 else coalesce(arg1, arg2) end -- least case when arg1 >= arg2 then arg1 else coalesce(arg1, arg2) end -- greatest... read more »