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.
SET gender =
WHEN ‘male’ THEN ‘female’
WHEN ‘female’ THEN ‘male’
Define a temp table.