The wildcard in a WHERE clause is useful when an exact match is not possible in a SELECT statement.
Solution:
The wildcard in a WHERE clause is useful when an exact match is not possible in a SELECT statement. Suppose you want to find all the names starting with “An” then in this case SELECT clause is not sufficient alone. With the help of a wildcard, we can retrieve our desired output.
Example: Find the names of employees from table Emp where fname starts with An?
Answer: The query will be :
SELECT *
FROM Emp
WHERE fname LIKE ‘An%’;
☛ Related Questions:
Comments
write a comment