WildCard Operator

Q 1: What is a wildcard operator in SQL?

Answer:

The LIKE operator makes use of wildcard characters. The LIKE operator is used in a WHERE clause to look for a specific pattern in a column.


SQL | Wildcard operators

Wildcard operators are used with the LIKE operator, which is generally used to search the data in the database and there are four basic operators %, _,-,[range_of_chracters]. Let us explain all these operators in brief –

Similar Reads

Operator Table

Operator Description % It is used in substitute of zero or more characters. _ It is used as a substitute for one character. – It is used to substitute a range of characters. [range_of_characters] It is used to fetch a matching set or range of characters specified inside the brackets....

Using the % Wildcard

...

Using the _ Wildcard

...

Using the [Charlist] Wildcard

1. To fetch records from the Customer table with LastName containing letters ‘a, ‘b’, or ‘c’....

Using Both % and _ Wildcard

1. To fetch records from the Student table with the PHONE field having an ‘8’ in the 1st position and a ‘3’ in the 3rd position....

FAQs on WildCard Operator

Q 1: What is a wildcard operator in SQL?...