So I have one table with duplicates of data and I only want to copy the distinct rows into the new table and also give the new table primary key id. This is what I have so far but it doesn't seem to do what I want it to.
INSERT INTO m_new
SELECT * FROM m
WHERE EXISTS (
SELECT DISTINCT address, city, zip FROM m
)
m? What ismm?