Update Male TO Female and Female To Male with single query

Satyapriyanayak
Posted by Satyapriyanayak under Sql Server category on | Points: 40 | Views : 1154
UPDATE table SET gender =
CASE gender WHEN 'male' THEN 'female' WHEN 'female' THEN 'male' ELSE gender END

Comments or Responses

Login to post response