Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.0 » UltraLite - Database Management and Reference » UltraLite SQL Reference » UltraLite SQL elements reference » Expressions in UltraLite » Search conditions in UltraLite


Comparison operators

Any operator that allows two or more expressions to be compared with in a search condition.

expression operator expression




equal to


a text comparison, possibly using regular expressions


greater than


less than


greater than or equal to


less than or equal to


not equal to


not equal to


not greater than


not less than


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

Case-sensitivity   In UltraLite, comparisons are carried out with the same attention to case as the database on which they are operating. By default, UltraLite databases are created as case insensitive.

NOT operator   The NOT operator negates an expression.

See also

Either of the following two queries will find all Tee shirts and baseball caps that cost $10 or less. However, note the difference in position between the negative logical operator (NOT) and the negative comparison operator (!>).

SELECT ID, Name, Quantity
FROM Products
WHERE (name = 'Tee Shirt' OR name = 'BaseBall Cap')
AND NOT UnitPrice > 10;
SELECT ID, Name, Quantity
FROM Products
WHERE (name = 'Tee Shirt' OR name = 'BaseBall Cap')
AND UnitPrice !> 10;