
272
Programming Languages for mis
whose street names contain “Westport.” Here, the percent sign “%” is a wildcard to repre-
sent any collection of characters.
Listing9.11: LIKE Operator and Wildcard “%”
SELECT *
FROM tblStudent
WHERE StudentAddress LIKE '%Westport%';
Listing9.12 is a query that finds the student record for each student whose name has
the letter “o” as the second letter of the name. Here, the wildcard sign “_ ” represents any
one character.
Listing9.12: LIKE Operator and Wildcard “_”
SELECT *
FROM tblStudent
WHERE StudentName LIKE '_o%';
e IN operator allows you to specify a list of character strings to be included in a
search. Listing ...