Database Reference
In-Depth Information
Figure 4.5
A Simple Query.
4.2.1
Simple Query
Once again, here is a simple query. The result is shown in Figure 4.5.
SELECT ARTIST_ID, NAME FROM ARTIST;
4.2.2
Filtered Query
How can we filter the results retrieved with a query? Filtering eliminates
rows from a query and is done with the WHERE clause. Figure 4.6 shows
all rows with artists containing the vowel “a” in their names.
SELECT ARTIST_ID, NAME FROM ARTIST WHERE NAME LIKE '%a%' ;
Note: The percentage character (%) is used as a wild card character repre-
senting zero or more characters. Oracle SQL wild card characters used with
the LIKE clause are explained in Chapter 5 under the heading “WHERE
Clause Expression Conditions.”
Search WWH ::




Custom Search