Announcement
Collapse
No announcement yet.
UPDATE SQL statement
Collapse
X
-
Hi,
Go through with following SQL statement
UPDATE Gender SET sex = CASE sex WHEN 'm' THEN 'f' ELSE 'm' END
Leave a comment:
-
UPDATE SQL statement
Hello friends,
I want to update all F (female) and M (Male) values (change all F values to M and vice versa) as per following table.
Id >> Name >> Sex >> Salary
1 >> A >> m >> 5000
2 >> B >> f >> 2500
3 >> C >> m >> 7500
4 >> D >> f >> 800
How should I write the query to update the values?Tags: None
Leave a comment: