SQL LIKE Operator: Filtering with Wildcards

Day 19/90 — SQL Series | Week 3: Functions "Find all customers whose name starts with R." "Find all emails from Gmail." "Find all products with 'shirt' somewhere in the name." All 3 solved with LIKE + wildcards. % → any number of characters (zero or more) _ → exactly one character WHERE name LIKE 'R%' → starts with R (Rahul, Rohan, Riya) WHERE email LIKE '%@gmail.com' → ends with @gmail.com WHERE product LIKE '%shirt%' → 'shirt' anywhere in the name WHERE code LIKE 'A_01' → A then any 1 char then 01 (e.g. AB01, AC01) LIKE is case-insensitive in SQL Server by default. Combine with NOT LIKE to exclude patterns. #SQL #LIKEOperator #DataAnalytics #LearnSQL #DataAnalyst

  • graphical user interface, application

To view or add a comment, sign in

Explore content categories