Filtering on a Single Column
To demonstrate filtering, modify the SELECT statement to retrieve only movies with a RatingID of 1. Listing 6.7 contains the SELECT statement, and the resulting output appears in Figure 6.10.
Figure 6.10. Using the WHERE clause, you can restrict the scope of a SELECT search.
Listing 6.7. SELECT with WHERE Clause
SELECT MovieTitle, PitchText, Summary FROM Films WHERE RatingID=1 ORDER BY MovieTitle DESC |
Get Adobe ColdFusion 8 Web Application Construction Kit, Volume 1: Getting Started now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.