Like Operator


Prev Tutorial Next Tutorial

Like Operator

Like Operator is used in a WHERE clause to search for a specified pattern in a column. Suppose you want to search those employee record whose name start with H alphabet.

Syntax

SELECT column_name
FROM table_name
WHERE column_name LIKE pattern;

Employee table

emp_idnamesalary
101Amit24000
102Rahul34000
103Sultan54000
104Gaurav26000
105Hitesh35000

Example

SELECT * from Employee
WHERE name LIKE 'H%';

Result after using Like Operator.

105Hitesh35000

Prev Tutorial Next Tutorial

Advertisements




Facebook Likes

Advertisements