Q:
Answer
In a nutshell, a temp table is a temporary storage structure. It means you can use a temp table to store data temporarily so you can manipulate and change it before it reaches its destination format.
In table_user.gender column change ‘male to female’ and ‘female to male’ in one SQL statement.
UPDATE table_user
SET gender =
CASE gender
WHEN ‘male’ THEN ‘female’
WHEN ‘female’ THEN ‘male’
ELSE gender
END
View answer
Workspace
Report Error
Discuss