Deleting rows referenced from another table.

I have a table with a ton of duplicate rows I need to remove.  I have it to the point where I have another table, with one field, ID, that contains the ID of the records I want to delete in the other table.

DELETE FROM bigtable WHERE ID = smalltable.ID

I know how I'd do this in something like C# but I'm stumped when it comes to SQL.  How do I run a loop through the smaller 'ID' table and at the same time, delete each of the associated records in the big table?  I probably need a join but how to incorporate the delete?

Who is Participating?
Chris LuttrellConnect With a Mentor Senior Database ArchitectCommented:
Delete from bigtable
FROM bigtable inner join smalltable on bigtable.ID = smalltable.ID
Aneesh RetnakaranConnect With a Mentor Database AdministratorCommented:
DELETE FROM bigtable WHERE ID IN (SELECT ID FROM  smalltable )
Meshman333Author Commented:
Awesome, thanks!
All Courses

From novice to tech pro — start learning today.