Use of LIKE in SQL

The LIKE statement is often used in SQL queries with wildcards to find data that is similar to a matching pattern. PL/SQL has two forms of wildcard: _ and %.
The “" matches a single character, while “%” matches n number of characters. The _ is faster than % because only one character needs to be evaluated; “%” must perform look-ahead parsing. "” also works a little differently than “%” because it requires that a match exist, whereas “%” does not have this requirement.

Consider the following statement:

 select * from table_name where 'JAMES' like 'Jame_';

This will match; but you won’t get a match with the following:

 select * from table_name where 'Jane' like 'Jane_';

You would, however, get a match if the previous statement was written as follows:

 select * from table_name where 'Jane' like 'Jane%';

There is a tendency to use “%” with all LIKE statements. When the exact number of characters to be matched is known, it is more efficient to use “_”.