The comparison operators

Adaptive Server uses these comparison operators:

Table 1-8: Comparison operators

Operator

Meaning

=

Equal to

>

Greater than

<

Less than

>=

Greater than or equal to

<=

Less than or equal to

<>

Not equal to

!=

Not equal to (Transact-SQL extension)

!>

Not greater than (Transact-SQL extension)

!<

Not less than (Transact-SQL extension)

In comparing character data, < means closer to the beginning of the server’s sort order and > means closer to the end of the sort order. Uppercase and lowercase letters are equal in a sort order that is case-insensitive. Use sp_helpsort to see the sort order for your Adaptive Server. For comparison purposes, trailing blanks are ignored.

In comparing dates, < means earlier than and > means later than.

Put single or double quotes around all character and date and time data used with a comparison operator:

= "Bennet" 
  "May 22 1947"