Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • Awesome. Yet another use case for that lovely having clause :-) But I think you should write >, instead of >=. That might accelerate things Commented Aug 26, 2011 at 15:30
  • I don't see the point of this having at all. As it stands, it should always be true, so it is pointless. And if you change it to >1, then rows without duplicates would be omitted from the inner select and thus removed by the outer delete. Not what you'd want, I believe. Commented Sep 18, 2012 at 19:21
  • @LukasEder: with > that would delete all entries, that have only single phone. I think you didn't notice that there is not in the condition. Commented Apr 29, 2013 at 10:01
  • 1
    "#1093 - You can't specify target table 'bkPhone' for update in FROM clause" says SQL Fiddle Commented Dec 11, 2013 at 10:16