"if you encounter any errors in SAP, send me a screenshot at pramod@learntosap.com, and I will help you resolve the issue."

SQL LIKE Operator Explained with Examples | SQL Pattern Matching

SQL TUTORIALS-

SQL LIKE Operator

Introduction-


Trulli Trulli

How To Use SQL LIKE Operator Explained with Examples | SQL Pattern Matching

✅SQL LIKE operator is used to search for a specified pattern in a column. It works with WHERE and is commonly used in SELECT, UPDATE, or DELETE statements..mostly Wildcard Symbols in LIKE.EXAMPLE-'a%' = starts with "a" AND 'a_' = "a" + one character.

-✅Symbols in LIKE:- %, _,


Emoji Examples in HTML

🔸 Example Table: Student


ID Name CITY
1 ANNI PUNE
2 SUJAN MUMBAI
3 BOULT DELHI

✅ Names that start with 'A'-



SELECT Name
FROM Students
WHERE Name LIKE 'A%';

✅Result Show :-

Result → ANNI |


✅ Names that end with 'T'.



SELECT Name
FROM Students
WHERE Name LIKE '%T';

✅Result Show :-

Result → BOULT |


✅ Names that contain 'LT' anywhere



SELECT Name
FROM Students
WHERE Name LIKE '%LT%';



✅Result Show :-

Result → BOULT |

✅ Names with exactly 4 letters starting with 'SU'.



SELECT Name
FROM Students
WHERE Name LIKE 'SU___';

✅Result Show :-

Result → SUJAN |


May Be Like Important Link-

-SQL Tutorial for Beginners – Introduction to SQL

-SQL TOP, LIMIT, FETCH FIRST or ROWNUM Clause

-SQL SELECT DISTINCT Statement Clause Explained with Examples

-SQL Wildcard Characters: Complete Guide with Examples