User Guide

Table Of Contents
454 Chapter 19: Introduction to Databases and SQL
Operators
The following basic operators specify conditions and perform logical and numeric functions:
Case sensitivity with databases
ColdFusion MX is a case-insensitive programming environment. Case insensitivity means the
following statements are equivalent:
<cfset foo="bar">
<CFSET FOO="BAR">
<CfSet FOO="bar">
However, many databases, especially UNIX databases, are case-sensitive. Case sensitivity means
that you must match exactly the case of all column and table names in SQL queries.
For example, the following queries are not equivalent in a case-sensitive database:
SELECT LastName FROM EMPLOYEES
SELECT LASTNAME FROM employees
In a case-sensitive database, employees and EMPLOYEES are two different tables.
For information on how your database handles case, see the product documentation.
Operator Description
AND Both conditions must be met
OR At least one condition must be met
NOT Exclude the condition following
LIKE Matches with a pattern
IN Matches with a list of values
BETWEEN Matches with a range of values
=Equal to
<> Not equal to
< Less than
> Greater than
<= Less than or equal to
>= Greater than or equal to
+ Addition
-Subtraction
/ Division
* Multiplication