Wednesday, November 14, 2012

id name gender 1 Ram Female 2 Kumar Female 3 sathish Female 4 Santhya Male 5 Durga Male 6 Priya Male This is my input...how to change Gender Male to Female & Female to Male??? Write sql query for this question???


update stud set gender =
case gender
when 'male' then 'female'
when 'female' then 'male'
end;

No comments:

Post a Comment

Thank you :
- kareem