ILIKE
Example
Section titled “Example”SELECT nameFROM studentsWHERE name ILIKE '%John%';Output
Section titled “Output” name-------------- John Doe John SmithExplanation
Section titled “Explanation”The ILIKE operator in the SQL query matches the student names in the PostgreSQL database which are containing ‘John’ regardless of the case.
Example
Section titled “Example”SELECT * FROM EmployeesWHERE Employee_Name ILIKE '%doe%';Output
Section titled “Output”| Employee_ID | Employee_Name | Occupation | Salary || ----------- | -------------- | ----------- | ------ || 3 | John Doe | Accountant | 50000 || 5 | Jane Doe | Designer | 60000 |Explanation
Section titled “Explanation”In the code, ILIKE keyword is used in the WHERE clause to find all records where Employee_Name includes the substring ‘doe’, without pondering about case sensitivity. The output shows returned employees whose names match the criteria.