How do I selectively purge MySQL table rows using a list of column values? I am new to databases and working with MySQL. I have a large MySQL table with the following columns: Id, Link, Timestamp.

And I have a list of links. I want to keep only the rows with link column that matches an entry in this list.

Any pointers to how I accomplish this?
DELETE FROM MyBigUberTable WHERE Link NOT IN (...);


That should do it. Just replace the ellipsis with a comma-separated list of of Link values (or a SELECT statement that produces said list).