I have a table

```
EmpId   EmpName   ManagerId   Gender                  
1       Shahzad       2         M         
2       Santosh       1         F         
3       Sayanhi       2         M         

```

By mistake 'M' is assigned to female employees and 'F' is assigned to male employees. So I need to write a query to make the correction.

I tried the below query.

```
UPDATE Employee 
SET Gender='M' 
WHERE EmpId IN (SELECT EmpId FROM Employee WHERE Gender='F') 
  AND Gender='F'
WHERE EmpId IN (SELECT EmpId FROM Employee WHERE Gender='M')

```

but it didn't work.