Blog Post

Strange T-SQL Operator Syntax

,

I can’t remember where I saw this, but it made an interesting Question of the Day:

select *

from Sales

where Profit !< 10000;

I had never seen anything like this, in all my years of working in C, C++, Java, Lisp, APL, Pascal, Fortran, VB, C#, SQL, and more. However, there are apparently a few operators that I’ve never used:

  • !<
  • !>

These are the not less than and not greater than.

Weird, though I guess this makes sense. Personally, I think restructuring as greater than or equal to instead of not less than makes perfect sense.

Original post (opens in new tab)
View comments in original post (opens in new tab)

Rate

You rated this post out of 5. Change rating

Share

Share

Rate

You rated this post out of 5. Change rating