LIKE Clause

Purpose: The LIKE clause is used in the WHERE clause to search for a specified pattern in a column.Syntax:

WHERE column_name LIKE pattern;

Example:

SELECT * FROM employees WHERE first_name LIKE 'J%';

Explanation: This retrieves employees whose first names start with “J”. The % wildcard represents zero or more characters.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *