Skip to content

Eduguru

  • Tutorial and Training
    • SQL Server
    • Linux Tutorial
    • PHP Tutorial
    • Asterisk Tutorial
    • MySQL Tutorial
    • JavaScript Tutorial
    • C Tutorial
    • Who Breaks into Computer Systems
    • Planning and Performing Hacking Attacks
    • Maintaining Anonymity
    • Selecting Security Assessment Tools
    • Scanning Systems
  • Contact Us
    • Feedback
  • Business
    • Solutions
      • Job : Dialer Support
    • ViciDial – GoautoDial Support
    • Domain Registration
    • Web Hosting
    • Consultancy
    • Dialer Support
  • About Us
  • News
  • Donate Online
  • Offers
  • Newsletter
  • Jobs
  • Sale
    • Amazon
    • Get Computer Books
    • Amazon Sale Offer
  • Search
  • Python Tutorial
  • Search
  • WPMS HTML Sitemap
  • Log In
  • Log Out
  • Register
  • Lost Password
  • Reset Password
  • Download
  • Result
  • Newsletter
  • search
  • MySQL – Video Tutorial
  • Products Page
    • Checkout
    • Transaction Results
    • Your Account
  • Privacy
mysql 5.7

MySQL LIKE Operator

March 13, 2019 by Manisha Patel

MySQL LIKE Operator

The LIKE operator is used in a WHERE clause to search for a specified pattern in a column.

There are  % wildcards often used in conjunction with the LIKE operator:

  • % – The percent sign represents zero, one, or multiple characters
  • _ – The underscore represents a single character

 

SELECT column1, column2, … FROM table_name WHERE columnN LIKE pattern;

Here are some examples showing different LIKE operators with ‘%’ and ‘_’ wildcards:

LIKE Operator Description
WHERE CustomerName LIKE ‘a%’ Finds any values that start with “a”
WHERE CustomerName LIKE ‘%a’ Finds any values that end with “a”
WHERE CustomerName LIKE ‘%or%’ Finds any values that have “or” in any position
WHERE CustomerName LIKE ‘_r%’ Finds any values that have “r” in the second position
WHERE CustomerName LIKE ‘a_%_%’ Finds any values that start with “a” and are at least 3 characters in length
WHERE ContactName LIKE ‘a%o’ Finds any values that start with “a” and ends with “o”

 

Example 1:

SELECT * FROM Customers WHERE CustomerName LIKE ‘a%’;

SELECT * FROM Customers WHERE CustomerName LIKE ‘%a’;

SELECT     employeeNumber,     lastName,    firstName FROM     employees WHERE    lastName LIKE ‘%on’;

 

Categories mysql Tags MySQL, mysql function, mysql like example, mysql like in where, MySQL LIKE Operator, mysql like operator query, mysql operator, mysql query like, wHERE CustomerName LIKE 'a%';
MySQL SUM function
MySQL table join

Recent Posts

  • Hostinger vs Bluehost vs GoDaddy India: A Comprehensive Comparison
  • Exotel vs MyOperator vs Knowlarity: Cloud Telephony Compared
  • WhatsApp Cloud API vs BSP Providers: In-Depth Comparison
  • Freshdesk vs Zoho Desk vs HubSpot: A Comprehensive Helpdesk Comparison
  • How to Start a Side Hustle in India: A Comprehensive Guide
  • Railway Jobs in India: A Comprehensive Guide on How to Apply
  • Cybersecurity Career in India: How to Start Your Journey
  • 10 Best Work From Home Jobs for Women in India
  • Naukri vs LinkedIn vs Indeed: The Ultimate Job Search Comparison
  • Your Ultimate Roadmap to a Digital Marketing Career in India
  • Ultimate Guide to SSC CGL Exam Preparation
  • SBI PO vs IBPS PO: A Comprehensive Comparison for Banking Aspirants
  • Navigating the Data Science Career Path in India
  • How to Build a Winning LinkedIn Profile for Job Seekers in India
  • Remote Work Jobs for Indians: Your Comprehensive Guide
  • Study Abroad from India: A Comprehensive Step-by-Step Guide
  • CAT vs XAT vs SNAP: A Comprehensive Comparison for MBA Aspirants
  • State Board vs CBSE: Which is Better for Indian Students?
  • Top 10 Free Learning Apps for Indian School Students
  • Online Degree vs Regular Degree in India: An In-Depth Comparison
  • Complete Guide to B.Tech Admission Process for IITs
  • How to Choose the Right Engineering Branch in India: A Complete Guide
  • Top 10 Diploma and Certificate Courses After 10th Grade
  • IGNOU Admission Process Explained Step by Step
  • Top 10 Online Coaching Platforms for IIT JEE in India
  • Understanding Generative AI: A Beginner’s Guide
  • Top 15 ChatGPT Prompts for Students to Boost Learning
  • How to Build an AI Agent Without Coding: A Step-by-Step Guide
  • 10 Best AI Resume Builder Tools for Indian Job Seekers
  • Top 10 AI Tools for Digital Marketing in India
  • Top 20 Free AI Image Generators to Try in 2026
  • 10 Effective ChatGPT Prompts for Indian Classroom Teachers
  • PM Scholarship Scheme: Eligibility and Application Guide
  • Jio vs Airtel vs Vi: Best Mobile Plans Compared
  • UPI Apps Compared: PhonePe vs Google Pay vs Paytm
  • Top 10 Budget Smartphones in India for 2026
  • Top 10 Web Hosting Services in India for Beginners
  • Top 10 Laptops for Students in India Under ₹50,000
  • AI Impact on Jobs in India: Skills to Embrace for Future Growth
  • Top Skills Employers Want in India 2026
  • Top 10 Government Jobs After Graduation in India
  • How to Prepare for UPSC Prelims: A Beginner’s Guide
  • Top 10 Courses After 12th Commerce for Bright Careers
  • Top 10 Courses After 12th Science in India: Complete Guide
  • Top Scholarships for Indian College Students in 2026
  • How to Check CBSE Class 12 Results and What to Do Next
  • Top Tips for CBSE Class 12 Board Exam Preparation
  • Top 10 AI Tools for Students in India in 2026
  • Top 10 Highest Paying Jobs in India for 2026
  • Ultimate JEE Main Study Plan for Class 12 Students

Recent Post

  • Hostinger vs Bluehost vs GoDaddy India: A Comprehensive Comparison
  • Exotel vs MyOperator vs Knowlarity: Cloud Telephony Compared
  • WhatsApp Cloud API vs BSP Providers: In-Depth Comparison
  • Freshdesk vs Zoho Desk vs HubSpot: A Comprehensive Helpdesk Comparison
  • How to Start a Side Hustle in India: A Comprehensive Guide
© 2026 Eduguru • Built with GeneratePress