8
In Mysql, I have an old table entities
where the column gender
is in the format ENUM, containing values of the type: "i", "m", "f".
When migrating this data to the new structure of this table, I intended to execute a database query collecting the values as they will be in the target table:
Example:
┌─────────────┬────────────────────┐
│ Valor atual │ Valor pretendido │
├─────────────┼────────────────────┤
│ i │ undifferentiated │
├─────────────┼────────────────────┤
│ m │ male │
├─────────────┼────────────────────┤
│ f │ female │
└─────────────┴────────────────────┘
How can I apply a condition IF ELSE
in the selection of this column, indicating the desired value for each of the existing options?