Using CASE Statements In A SQL UPDATE Query

Muralidosscm
Posted by Muralidosscm under Sql Server category on | Points: 40 | Views : 1069
UPDATE
[Tax]
SET
balance =
(
CASE
WHEN
((bal - 500) < 0)
THEN
0
ELSE
(bal - 500)
END
)
WHERE
id = 1

Comments or Responses

Login to post response