Help with SQL Update Statement

In the attached image of table ‘INVOICES’, where the Patient’s Gender is listed as m= male & f=female; is the ‘Update Statement’ quoted below correct to swap all male & female values (in other words, change all the m to f & vice versa) ?

UPDATE INVOICES
SET Sex = (
CASE Sex
WHEN 'f' THEN 'm'
WHEN 'm' THEN 'f'
END
)

Thanks in Advance

Yes, in general. You don't really need the parentheses around the CASE though.

SET Sex = CASE Sex WHEN 'f' THEN 'm' WHEN 'm' THEN 'f' END

UPDATE INVOICES
SET Sex = CASE WHEN Sex = 'm' THEN 'f' 
WHEN Sex = 'f' THEN 'm'
ELSE Sex END

Thanks Everyone.