Remove duplicate data
Add two fields
Alter TableT_employeeAddFsubcompanyVarchar(20);
Alter TableT_employeeAddFdepartmentVarchar(20);
Assign values to newly added fields
UpdateT_employeeSetFsubcompany='Beijing',Fdepartment='Development' WhereFnumber='Dev001';
UpdateT_employeeSetFsubcompany='Shenzhen',Fdepartment='Development' WhereFnumber='Dev002';
UpdateT_employeeSetFsubcompany='Beijing',Fdepartment='Humanresource' WhereFnumber='Hr001';
UpdateT_employeeSetFsubcompany='Beijing',Fdepartment='Humanresource' WhereFnumber='Hr002';
UpdateT_employeeSetFsubcompany='Beijing',Fdepartment='Infotech' WhereFnumber='It001';
UpdateT_employeeSetFsubcompany='Shenzhen',Fdepartment='Infotech' WhereFnumber='It002';
UpdateT_employeeSetFsubcompany='Beijing',Fdepartment='Sales' WhereFnumber='Sales001';
UpdateT_employeeSetFsubcompany='Beijing',Fdepartment='Sales' WhereFnumber='Sales002';
Update T_employeeSetFsubcompany='Shenzhen',Fdepartment='Sales' WhereFnumber='Sales003';
Query and remove duplicates
Select DistinctFdepartmentFromT_employee
select distinct fdepartment , fsubcompany from t_employee