I need to update a table where '1' and '0' were incorrectly assigned for employee sex; how can I change '1' to represent females and '0' to represent males? Write a PostgreSQL statement that updates only these two codes and leaves NULL or other values unchanged.
employee_id and the corrected sex.employee_id ascending.| Column | Type | Description |
|---|---|---|
| employee_idPK | INT | Unique employee identifier |
| employee_name | VARCHAR(100) | Employee name |
| sex | VARCHAR(20) | Employee sex value, including incorrectly coded and corrected values |
| department | VARCHAR(50) | Employee department |