Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.
Shade in the A or B circle for each question.
Draw a line connecting each item on the left to its match on the right.
| Left column | Right column | |
|---|---|---|
| 1WHERE lastName LIKE 'S%' | AFinds students whose last name starts with S, because % stands for any characters after the S | |
| 2WHERE name LIKE '%s' | BThe pattern is missing its quote marks. It should be LIKE '%at%'. | |
| 3Find products whose name contains the letters at anywhere in the text | CSELECT firstName FROM students WHERE firstName LIKE 'L%'; | |
| 4Find students whose first name starts with L | DFinds products whose name ends with s, because % stands for any characters before the s | |
| 5SELECT * FROM students WHERE firstName = 'A%'; | ESELECT name FROM products WHERE name LIKE '%at%'; | |
| 6SELECT name FROM products WHERE name LIKE %at%; | FThe = operator looks for the exact text A%, so the wildcard does not work. It should be LIKE 'A%'. |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
LIKE '%at%' — LIKE in a WHERE clause matches part of a text value. The % wildcard stands for any characters, so '%at%' finds text containing at, 'S%' starts with S and '%s' ends with s.SELECT firstName FROM students
WHERE firstName LIKE 'A%';SELECT name FROM products
WHERE name LIKE 'P%';SELECT name FROM products
WHERE name LIKE '%s';SELECT name FROM products
WHERE name LIKE '%at%';SELECT name FROM products
WHERE name LIKE 'P%';