I want to update a column with the max value of either the current col value OR the new value I pass. In pseudocode:
update table1 set employees=MAX(employees,30) where id=23
So, in the above case:
if employees is currently 20, the new value will BECOME 30
if employees is currently 50, the value will REMAIN 50
How can I do that? Is there a simple standard function for that available (I’d rather not use case statement)
Thanks!
1 Answer