To select all last names that start with 'S', you would use the LIKE operator in the WHERE clause. The correct condition to use would be:
D. WHERE LastName LIKE 'S%'
Explanation:
- Option A: WHERE LastName = 'S*' - This condition will only select last names that are exactly 'S*'. It will not select any last names that start with 'S'.
- Option B: WHERE LastName = 'S%' - This condition will only select last names that are exactly 'S%' (where '%' is a wildcard that represents any number of characters). It will not select any last names that start with 'S' followed by more characters.
- Option C: WHERE LastName LIKE 'S*' - This condition is similar to Option A and will only select last names that are exactly 'S*'. It will not select any last names that start with 'S'.
- Option D: WHERE LastName LIKE 'S%' - This condition will select last names that start with 'S' followed by any number of characters. The '%' wildcard represents any number of characters, so this condition will select all last names that begin with 'S'.
Therefore, the correct answer is D. WHERE LastName LIKE 'S%'.