O'Reilly logo

Sams Teach Yourself ColdFusion® in 21 Days by Charles Mohnike

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Qualifying a SELECT Statement with Conditions

By adding one or more conditions to my WHERE clause, I can get very specific as to which records I want my query to retrieve. Each condition functions like a true-false statement: If the query examines a record in which the conditional statement is true, the record is returned as output. If the statement is false, the query ignores the record and moves on.

SQL uses two types of operators to build conditional statements, relational operators and logical operators.

Relational Operators

Thus far, all my queries have used the equals operator (=), which determines whether the contents of a field are equal to the text I supply. The equal sign works just fine for comparing text strings such as "Baby, Let's ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required