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.

Required fields*

4
  • 8
    why not just CDATA it? what happens when your query contains XML? Commented Sep 8, 2012 at 18:30
  • 6
    what happens when someone needs a query with a less-than comparison? Or any other XML reserved symbol? This is the oddest reason I have ever heard for preferring one over the other. What about when you are writing C code, do you have a preference for operators that can be expressed in XML without escaping? Commented Dec 7, 2021 at 22:36
  • Thinking about <> as "less than, greater than" can be a good thing here. SQL Server can use an index seek for inequality queries (expressed either way) by breaking it into two index range seeks (less than x and greater than x) Commented Feb 11, 2023 at 20:13
  • That's a very biased claim. The "<>" wasn't chosen at random, it predates your "C-speaking" languages. And XML has nothing to do with SQL. Commented May 18 at 14:46