Chapter 3: Querying a Database
23
Operators
These specify conditions and perform logical and numeric functions:
SQL Notes and Considerations
Keep the following in mind when writing SQL in ColdFusion:
•
There is a lot more to SQL than what is covered here. It’s a good idea to
purchase one or several SQL guides that you can refer to.
•
The data source, columns, and tables that you reference must exist in order to
perform a successful query.
•
Some DBMS vendors use non-standard SQL syntax (known as a dialect) in their
products. ColdFusion does not validate the SQL in a CFQUERY, so you are free
to use any syntax that is supported by your data source. Check your DBMS
documentation for non-standard SQL usage.
Basic SQL Operators
Operator
Description
AND
Both conditions must be met, such as Paris AND Texas
OR
At least one condition must be met, such as Smith OR Smyth
NOT
Exclude the condition following, such as Paris NOT France
=
Equal to
<>
Not equal to
<
Less than
>
Greater than
<=
Less than or equal to
>=
Greater than or equal to
+
Addition
-
Subtraction
/
Division
*
Multiplication
Summary of Contents for COLDFUSION 4.5-DEVELOPING WEB
Page 1: ...Allaire Corporation Developing Web Applications with ColdFusion ColdFusion 4 5...
Page 14: ...xiv Developing Web Applications with ColdFusion...
Page 26: ...xxvi Developing Web Applications with ColdFusion...
Page 34: ...8 Developing Web Applications with ColdFusion...
Page 70: ...44 Developing Web Applications with ColdFusion...
Page 84: ...58 Developing Web Applications with ColdFusion...
Page 114: ...88 Developing Web Applications with ColdFusion...
Page 148: ...122 Developing Web Applications with ColdFusion...
Page 174: ...148 Developing Web Applications with ColdFusion...
Page 208: ...182 Developing Web Applications with ColdFusion...
Page 244: ...218 Developing Web Applications with ColdFusion...
Page 274: ...248 Developing Web Applications with ColdFusion...
Page 288: ...262 Developing Web Applications with ColdFusion...
Page 300: ...274 Developing Web Applications with ColdFusion...
Page 350: ...324 Developing Web Applications with ColdFusion...
Page 362: ...336 Developing Web Applications with ColdFusion...