I have two SQL tables
The first table maps sets to plans as illustrated below
planToSetID | planID | setID
The second table holds plan information as illustrated below
planID | planName | otherColumns.......
My problem is that some rows from the second table were deleted but there are still rows in the first table (the mapping table) that reference the delete rows. I want to delete all the rows from the first table that have a planID that doesn't exist in the second table (the information table)
Thanks in advance!
Start Free Trial