3 ms·
Had a case where I needed to update MySQL column's value if an incoming argument is less/greater than it without using functions or procedures. This returns th
by alex-ant 7y ago
Had a case where I needed to update MySQL column's value if an incoming argument is less/greater than it without using functions or procedures.
This returns the greatest value (passed ? or max_value column):
?^((?^max_value)&-(?<max_value))
And for minimum:
min_value^((?^min_value)&-(?<min_value))