Inequality (<>, !=)
The inequality operator can be conceptualized as the opposite of the equality operator. It can be accessed by the symbol <>
as well as the symbol !=
and returns FALSE
when two values are the same, and TRUE
when they are not the. For example, consider the following expressions:
Comparing two values of different type will always be TRUE
, for example:
It is important to be careful when comparing two complex values such as Currencies, Times, Dates, and DateTimes. The result will only be FALSE
if the two values are exactly the same rather than just similar. For example, note that the following two Currency values are not considered equal by the equality operator, even though they both represent 40 US dollars, because one gives the monetary value in cents while the other gives it in dollars:
Last updated