If we want to extract those rows which contain the first_name with the letter 'y' in any position from employees table, the following statement can be used.
If we want to extract those rows which contain the first_name second most starting with the letter 'h' from employees table, the following statement can be used. If we want to extract those rows which contain the first_name ending with the letter 'h' from employees table, the following statement can be used. If we want to extract those rows which contain the first_name starting with the letter 'M' from employees table, the following statement can be used.
The LIKE expression returns true if the string matches the supplied pattern. There are three types of pattern matching in PostgreSQL : LIKE operator, SIMILAR TO operator, and POSIX-style regular expressions.