Your question is Update Employee Sex Codes in SQL. Start with the requirements and the one table on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
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 |