What would be the easiest way to this in sql:
I need to subtract 100 from column foo, but if doing this makes the value of foo less than 0, then I need it to add 1 to column bar. Is there an IF command that would allow me to do this, or would i have to compare and subtract the values for each row individually?
thanks