How to get min/max of two integers in Postgres/SQL? October 15, 2022 by Tarik Have a look at GREATEST and LEAST. UPDATE my_table SET my_column = GREATEST(my_column - 10, 0);