What is Like operator?
- LIKE in oracle enables the user to search for a string of the matching type.
- "%" is used as a wild card in the query.
- It is used in a WHERE clause to search for a specified pattern in a column.
- It is used to match or test a conditional term using a "wildcard search".
- There are two operators that are used for searching the "%" and "_".
- The percent matching(%) will match any group of characters and can stand for zero or more characters with no upper limit. The % sign can be added at the beginning or at the end of the term or on both of them.
- The underscore matching (_) is selective and matches any single character.
Example :The query below will display results of student names starting with A.
SELECT stud_name FROM dept WHERE student_name LIKE 'A%';