Skip to content

Instantly share code, notes, and snippets.

@jdjkelly
Created March 27, 2012 20:07
Show Gist options
  • Save jdjkelly/2219805 to your computer and use it in GitHub Desktop.
Save jdjkelly/2219805 to your computer and use it in GitHub Desktop.
Script to delete groups
delete from groups where group_id in (
select group_id from groups
where group_id not in (
select productgroup.groupid from groups
inner join productgroup ON groups.group_id = productgroup.groupid
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment