Blog

Update Male TO Female and Female To Male with single query

Posted by Satyapriya Nayak Blogs | SQL Apr 09, 2013
Update Male TO Female and Female To Male with single query
UPDATE    employee
SET             
gender = CASE gender WHEN 'male' THEN 'female' WHEN 'female' THEN 'male'
ELSE gender
END
COMMENT USING
PREMIUM SPONSORS
MCN is your source for developing solutions involving websites, mobile apps, cloud-computing, databases, BI, back-end services and processes and client-server applications.
Employers - Post Free Jobs
SPONSORED BY
  • MCN is your source for developing solutions involving websites, mobile apps, cloud-computing, databases, BI, back-end services and processes and client-server applications.
Employers - Post Free Jobs