Question : create table after eliminating record with  duplicates on one column

I have table like this:

department  job_description       active_code
1                  worker1                          32
1                  worker2                          33
1                  worker3                          34
2                  worker3                          35
2                  worker3                          36
2                  worker4                          37
                             
I need to eliminate records who have duplicates on the "job_description" column , to leave only one worker3 record on the table (doesn't care which one) , the output should be  like this:

department  job_description       active_code
1                    worker1                         32
1                    worker2                         33
1                    worker3                         34
2                     worker4                        37
 
only one worker3

Answer : create table after eliminating record with  duplicates on one column

the above post will give you the result set you demand... and this one do replace your table with the new one...
1:
2:
3:
4:
5:
6:
7:
8:
SELECT MIN(department) AS department, job_description, MIN(active_code) AS active_code INTO yourNewtable
FROM yourTable  
GROUP BY job_description

DROP TABLE yourTable

SELECT * INTO yourTable
FROM yourNewtable
Random Solutions  
 
programming4us programming4us