Skip to content
No results
Menu Options!
  • Home
  • Tech
    • Cloud Services
    • Phones
    • Software
    • Gov & Updates
  • OS
    • Windows
    • Mac
    • Linux
  • FinTech
    • Banks & Cards
    • Insurance
  • Microsoft Stack
    • BI Tools
    • DBA
    • Win Server & Admin
    • Azure Services
  • Courses
    • MySQL
  • Resources
    • About
    • Contact
    • Portfolio
    • Privacy Policy
Kingfisher Tech Tips
  • Home
  • Tech
    • Cloud Services
    • Phones
    • Software
    • Gov & Updates
  • OS
    • Windows
    • Mac
    • Linux
  • FinTech
    • Banks & Cards
    • Insurance
  • Microsoft Stack
    • BI Tools
    • DBA
    • Win Server & Admin
    • Azure Services
  • Courses
    • MySQL
  • Resources
    • About
    • Contact
    • Portfolio
    • Privacy Policy
Kingfisher Tech Tips
Home Courses MySQL SQL LIKE Operator | Querying Data from Single Table

SQL LIKE Operator | Querying Data from Single Table

  • VickeyVickey
  • 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

Vickey

💼 Microsoft Engineer | Founder – Kingfisher Tech Tips
I simplify complex tech into easy, actionable insights.
📌 Topics I cover: Data Engineering, SQL Server, SSRS/PBIRS, Azure, PC Tech, Banking & Finance, YouTube Tips, PC Tech Tips & more.
🎥 Catch my videos & guides on Kingfisher Tech Tips & YouTube.
📬 Have a query? Let’s connect!

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!

  • iPhone 17 Pro: Redefining the Pro iPhone Experience
  • iPhone Air: Apple’s Thinnest iPhone Ever Made
  • Apple iPhone 17: Features, Design, Camera, and Performance
  • Apple Watch Series 11, SE 3, and Ultra 3: The Most Powerful Apple Watch Lineup Yet
  • AirPods Pro 3: Apple Redefines Design and More

Categories!

  • Courses (1)
  • FinTech (34)
  • Microsoft Stack (79)
  • OS (4)
  • Tech (34)
  • Home
  • About
  • Contact
  • Portfolio
  • Privacy Policy

© 2023-2025 Kingfisher Tech Tips