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%' | AThe = operator compares exact text, so the % is not a wildcard. Use LIKE to match a pattern. | |
| 2WHERE name LIKE '%at%' | BWHERE lastName LIKE '%son' | |
| 3Find last names that end in son by putting % before the ending | C* is not a wildcard in SQL LIKE. Use % to match any run of characters, so the pattern should be 'S%'. | |
| 4The _ wildcard matches exactly one character, so this finds three-letter first names starting with L | DFinds students whose last name starts with S, followed by any number of other characters | |
| 5WHERE lastName LIKE 'S*' | EFinds names that contain the letters 'at' anywhere, such as Water Bottle or Calculator | |
| 6WHERE lastName = 'S%' | FWHERE firstName LIKE 'L__' |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
WHERE lastName LIKE 'S%' — LIKE matches text by pattern in a WHERE clause. % stands for any run of characters and _ for exactly one, so 'S%' finds values starting with S and '%son' finds values ending in son.SELECT * FROM students
WHERE lastName LIKE 'S%';SELECT firstName, lastName
FROM students
WHERE lastName LIKE 'S%';SELECT * FROM students
WHERE lastName LIKE '%son';SELECT name FROM products
WHERE name LIKE '%at%';SELECT * FROM students
WHERE firstName LIKE 'Li_m';