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.

About way0utwest

Editor, SQLServerCentral
This entry was posted in Blog and tagged , . Bookmark the permalink.