Skip to content
No results
  • Home
  • Tech
    • Cloud Services
    • Phones
    • Software
    • Gov & Updates
  • OS
    • Windows
    • Mac
    • Linux
  • FinTech
    • Banks & Cards
    • Insurance
  • MS Tips
    • BI Tools
    • DBA
    • Windows Server
    • Azure
  • Courses
    • MySQL
Kingfisher Tech Tips
  • Home
  • Tech
    • Cloud Services
    • Phones
    • Software
    • Gov & Updates
  • OS
    • Windows
    • Mac
    • Linux
  • FinTech
    • Banks & Cards
    • Insurance
  • MS Tips
    • BI Tools
    • DBA
    • Windows Server
    • Azure
  • Courses
    • MySQL
Kingfisher Tech Tips
Home Courses MySQL SQL LIKE Operator | Querying Data from Single Table

SQL LIKE Operator | Querying Data from Single Table

  • Vickey RajpootVickey Rajpoot
  • May 28, 2024
SQL LIKE Operator

Querying Data from Single Table: You can use the SQL LIKE operator to find records that match a certain pattern in a database. It works well with the SELECT, UPDATE, and DELETE statements to filter the data based on the pattern you specify.

SQL LIKE Operator

— 1. “%” is the operator to get values based on conditions.

— 2. See 1st query (b%) indicates “get all the values starts with letter ‘b’ and end with any number of characters. (It doesn’t matter, whether it lower or upper case).

— 3. See 1st query if we specify (%b) then it indicates “get all the values end with letter ‘b’ and can begin with any number of characters. (It doesn’t matter, whether it lower or upper case).

— 4. See 2nd query (%b%) indicated “get all values which have “b” anywhere. (It returns any number of characters after or before “b”).

— 5. See 3rd query (_y) means “get one character before “y” (The number of underscores you specify, it will count and return the character).

— 6. My name is Vickey then, operator is used as (_____y). It will return values based on underscore and the letter you specify at last. For more click here!

SQL Example 1:

SELECT *
FROM customers
WHERE last_name LIKE 'b%';
SQL LIKE Operator

SQL Example 2:

SELECT *
FROM customers
WHERE last_name LIKE '%b%';
SQL LIKE Operator

SQL Example 3:

SELECT *
FROM customers
WHERE last_name LIKE '_____y';
SQL LIKE Operator

Watch Video!

Next Post >> #2.8) SQL REGEXP Operators

<<Previous Post #2.6) BETWEEN Operators

Vickey Rajpoot

Vickey Rajpoot

Hello there! I'm dedicated Microsoft Data & AI Engineer at LTIMindtree, where I thrive technology into actionable insights. Dive into my world by visiting my YouTube channel & Website, "Kingfisher Tech Tips"

SQL BETWEEN Operator
Previous Post SQL BETWEEN Operator | Querying Data from Single Table
Next Post SQL REGEXP Operator | Querying Data from Single Table
SQL REGEXP Operator:

Leave a ReplyCancel Reply

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

Latest Posts!

  • Calculation Items Errors Out In Analysis Services | Out Of Memory Error
  • Add Node To Analysis Services Failover (FCI-2)
  • Configure Analysis Services Failover Cluster (FCI-1)
  • Reporting Services License Change/Update In Easy!
  • OnePlus 13T/13 Mini | Best Phone In 2025!

Categories!

  • Courses (1)
  • FinTech (33)
  • MS Tips (78)
  • OS (4)
  • Tech (28)
  • Home
  • About
  • Contact
  • Privacy Policy

Copyright © 2023-2025 Kingfisher Tech Tips