- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What kind of string comparison, case-sensitive or not, can be performed by MySQL?
MySQL cannot perform a case-sensitive comparison when comparing characters. It can be illustrated with the following example from table ‘Employee’ having the following data −
mysql> Select * from Employee; +----+--------+--------+ | ID | Name | Salary | +----+--------+--------+ | 1 | Gaurav | 50000 | | 2 | Rahul | 20000 | | 3 | Advik | 25000 | | 4 | Aarav | 65000 | | 5 | Ram | 20000 | | 6 | Mohan | 30000 | | 7 | Aryan | NULL | | 8 | Vinay | NULL | +----+--------+--------+ 8 rows in set (0.09 sec)
The result set of the following query shows that MySQL is not case sensitive when comparing characters.
mysql> Select * from Employee WHERE Name IN ('gaurav','RAM'); +----+--------+--------+ | ID | Name | Salary | +----+--------+--------+ | 1 | Gaurav | 50000 | | 5 | Ram | 20000 | +----+--------+--------+ 2 rows in set (0.00 sec)
- Related Articles
- How MySQL can perform case-sensitive string comparison?
- Case sensitive string comparison in Java.
- How to make SQL case sensitive string comparison in MySQL?
- How to do case-sensitive string comparison in JavaScript?
- How do you force MySQL LIKE to be case sensitive?
- How is class comparison performed?
- Case-insensitive string comparison in C++
- What kind of compound units can be used in MySQL EXTRACT() function?
- Are MySQL database and table names case-sensitive?
- How to achieve case sensitive uniqueness and case insensitive search in MySQL?
- How can automated document classification be performed?
- Convert the column to a case-sensitive collation in MySQL?
- How do I make my string comparison case insensitive?
- How to do case insensitive string comparison of strings in JavaScript
- C++ Program to check string can be reduced to 2022 or not

Advertisements