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
  • 3
    If any "check for existence" query returns more than one row, I think it is more useful to double check your WHERE clause instead of LIMIT-ing the number of results. Commented Nov 23, 2010 at 8:25
  • 2
    I think Limit is used in Oracle and not in SQL Server Commented Nov 23, 2010 at 8:26
  • 7
    I'm considering the case where they can legitimately be multiple rows -- where the question is: "Is there (one or more) rows that satisfy this condition?" In that case, you don't want to look at all of them, just one. Commented Nov 23, 2010 at 8:26
  • 1
    @Shantanu -- I know, that's why I linked to the (very through) en.wikipedia article explaining the other forms. Commented Nov 23, 2010 at 8:27