Tag Archives: delete

DELETE all duplicates from TABLE

If we have a long table with thousands of records with some duplicate contents and we want to trim it down to the bare essentials (no duplicates), here’s one (of several) way of doing it: For this, assume we have: – a table called “emails”, with fields: id_email, email – the table has several records… Read More »

DELETE rows using SELECT results – part 2

Theres already a post here about deleting rows from some table using results from a different query. This is basically the same but more raw/basic. So i have: – a table ‘events’ with id_event,title, etc. – a table ‘users’ with id_user, name, etc. – a table ‘rel_users_events’, which is a relationship between ‘users’ and ‘events’,… Read More »

DELETE rows using SELECT results

  ok, so i made this nice query to..well, query two tables to check for missing ids on one of them (but it could be mostly anything else). Then i wanted to delete all the ids that dont have a match. This is kind of easily done by deleting the results from a query, but… Read More »