Skip to content
Saturday, May 10, 2025
Latest:
  • How to resolve -bash: netstat: command not found centos stream 9
  • python script to STT output in a text file
  • New Install Asterisk 18 from source on CentOS Stream 8
  • How to save audio stream from Asterisk to a file via WebSocket
  • create web socket and save data in a text file

Eduguru

Tech Blog and Discussion

  • Blog
  • Discussion
  • Asterisk Support
  • Contact Us
  • Quiz
    • C Program
    • C – Input/Output
    • PHP Program
    • Basic SQL
mysql 5.7
mysql 

MySQL LIKE Operator

March 13, 2019 Manisha Patel 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 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 OperatorDescription
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’;

 

Posts to Review:

MySQL Clustermysql concat function MySQL ClusterMySQL RAND Function MySQL ClusterMySQL trim function mysql 5.7MySQL SUM function
  • ← MySQL SUM function
  • MySQL table join →

Recent Article

  • How to resolve -bash: netstat: command not found centos stream 9
  • python script to STT output in a text file
  • New Install Asterisk 18 from source on CentOS Stream 8
  • How to save audio stream from Asterisk to a file via WebSocket
  • create web socket and save data in a text file
  • How to capture and analyze traffic with tcpdump
  • Installing Asterisk 20 From source On Rocky 9
  • html drop down with search from table php mysql
  • How to Install and Use FFmpeg on CentOS 8
  • How to get duration of MP3 or wav any audio File in PHP
  • How to Change location Of MariaDB Data Directory
  • How to check partition details of MySQL table
  • internal server error when download large file php
  • iostat : How to monitor disk activity and CPU load average
  • Webrtc with Asterisk 16 : complete configuration with SIP

Tags

1st Semester Question Paper asterisk basics of java C# coronavirus c program c program example c programming c tutorial c tutorials cyber security download bca question paper Download bca Question Paper december 2017 download ignou bca question dec 2017 download previous year question paper Download Question Paper december 2017 Download Question Paper June 2017 ETHICAL HACKING HACKERS HACKING html ignou IT- Security Java java basics java program java programming java tutorials learn c let us C Linux MySQL NEW TECHNOLOGY Question Paper Download RESEARCH AND INNOVATION security Software software testing technology testing ubuntu UNIX web-app web-site Write a C Program
Copyright © 2025 Eduguru. All rights reserved.
Theme: ColorMag by ThemeGrill. Powered by WordPress.