How to insert data from one table to another table without any duplicates

Hi team,
We are in processing for copying data from one to another table but it should be only distinct ones. so we are trying execute below syntax by stopping pipeline.

INSERT INTO newtable (select distinct(*) from existingtable);

but it is throwing syntax error as
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘*) from existingtable’ at line 1
SQLState: 42000
ErrorCode: 1064

can someone please help on how to fix that

I think you are missing the table alias. Try modifying it like this:

INSERT INTO newtable (select distinct(src.*) from existingtable src);

You can also try to use the IGNORE modifier in the insert command: