I would like to have an UPDATE
statement like this:
SELECT *
FROM Employee
WHERE age = CASE
WHEN (age < 20) THEN age=15
WHEN (age > 20) THEN age= 20
Is this not possible in SQL Server / MySQL? I do not want to use the stored procedures or other things.
Suggest me a suitable way around this problem.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…