I have a table which is as follows:
emp_name emp_address sex matial_status
uuuu eee m s
iiii iii f s
uuuu eee
I know this is old post, but recently I tested a solution and want to share if any one can find my solution helpful -
CREATE TABLE
tmpTableLIKEyourTable; insert intotmpTable(col1,col2...colN) SELECT distinctcol1,col2...colNFROMyourTableWHERE 1; drop tableyourTable; RENAME TABLEtmpTableTOyourTable;
Please note, insert into statement may execute without primary key.
Thanks.