Meshman333
asked on
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?
Thanks!
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?
Thanks!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER