
Register and join over 40,000 other developers!
Recent Topics
-
Print specific values from dictionary with a specific key name
Siten0308 - Jun 20 2019 01:43 PM
-
Learn algorithms and programming concepts
johnnylo - Apr 23 2019 07:49 AM
-
Job Gig PHP Form Needed
PJohnson - Apr 18 2019 03:55 AM
-
How to make code run differently depending on the platform it is running on?
xarzu - Apr 05 2019 09:17 AM
-
How do I set a breakpoint in an attached process in visual studio
xarzu - Apr 04 2019 11:47 AM
Recent Blog Entries
Recent Status Updates
Popular Tags
- networking
- Managed C++
- stream
- console
- database
- authentication
- Visual Basic 4 / 5 / 6
- session
- Connection
- asp.net
- import
- syntax
- hardware
- html5
- array
- mysql
- java
- php
- c++
- string
- C#
- html
- loop
- timer
- jquery
- ajax
- javascript
- programming
- android
- css
- assembly
- c
- form
- vb.net
- xml
- linked list
- login
- encryption
- pseudocode
- calculator
- sql
- python
- setup
- help
- game
- combobox
- binary
- hello world
- grid
- innerHTML

9 replies to this topic
#1
Posted 26 August 2007 - 11:37 AM
The title says it all. Is MySQL case sensitive?

#2
Guest_Jordan_*
Posted 28 August 2007 - 04:45 AM
I believe it depends on the Operating System you have MySQL on. I could be wrong though:
MySQL AB :: MySQL 5.0 Reference Manual :: 8.2.2 Identifier Case Sensitivity
[/B]
Although database and table names are not case sensitive on some platforms, you should not refer to a given database or table using different cases within the same statement. The following statement would not work because it refers to a table both as my_table and as MY_TABLE:
mysql> [B]SELECT * FROM my_table WHERE MY_TABLE.col=1;
MySQL AB :: MySQL 5.0 Reference Manual :: 8.2.2 Identifier Case Sensitivity
[/B]
#3
Posted 18 January 2011 - 02:03 AM
Hi,
I'm a Linux user, as we know Unix-based operating systems are strictly a case-sensitive. But even on Linux, mysql client's commands, SQL commands (in accordance with SQL standards) and function-names etc. are NOT case-sensitive, i.e. both 'select' and 'SELECT' are perfectly valid, however entity-names such as names of tables and databases are case-sensitive, i.e. if a table's name is 'Customer', we cannot use 'customer' or 'CUSTOMER'. Once again, remember: even though table-names are case-sensitive, column-names are not.
HTH
Aditya Shrivastava
Let's create a "suffering free world" BKWSU.com
.
I'm a Linux user, as we know Unix-based operating systems are strictly a case-sensitive. But even on Linux, mysql client's commands, SQL commands (in accordance with SQL standards) and function-names etc. are NOT case-sensitive, i.e. both 'select' and 'SELECT' are perfectly valid, however entity-names such as names of tables and databases are case-sensitive, i.e. if a table's name is 'Customer', we cannot use 'customer' or 'CUSTOMER'. Once again, remember: even though table-names are case-sensitive, column-names are not.
HTH
Aditya Shrivastava
Let's create a "suffering free world" BKWSU.com

Edited by shri_bill, 18 January 2011 - 02:47 AM.
#4
Posted 19 January 2011 - 05:48 PM
SQL itself isn't case sensitive, but it can be on searching data, all depends on the table collation settings.
I'm a System developer at XLENT Consultant Group mainly working with SugarCRM.
Please DO NOT send mail or PM to me with programming questions, post them in the appropriate forum instead, where I and others can answer you.
#5
Posted 21 January 2011 - 02:26 PM
No.
Programming is a journey, not a destination.
#6
Posted 24 January 2011 - 11:45 AM
MySQL syntax is not case sensitive, you can write
SELECT * FROM table WHERE ...
or
select * from table where...
or
SeLEct * FroM table WHerE
or whatever else you want.
On select queries you can search for case sensitive fields values, in example if you want to find "text" inside a field but not "TEXT", "Text".... you can use
SELECT * FROM table WHERE binary(fieldname)='text';
SELECT * FROM table WHERE ...
or
select * from table where...
or
SeLEct * FroM table WHerE
or whatever else you want.
On select queries you can search for case sensitive fields values, in example if you want to find "text" inside a field but not "TEXT", "Text".... you can use
SELECT * FROM table WHERE binary(fieldname)='text';
#7
Posted 15 November 2012 - 07:45 AM
In all new database-clients (regardless of OS), interaction with the MySQL server is NOT case-sensitive. This includes: standard SQL keywords, entity names, function-names etc. However certain switches in command line (in terminal) ARE case-sensitive, such as a statement terminated with \G will format the output differently than a lower-case \g or a semicolon ( ; ).
Regarding the data within the database, I agree with "Alhazred" that we can use the binary() function.
However the client
Aditya Shrivastava
When I change the world will change. Let's create a "suffering free world" BKWSU.com
.
Regarding the data within the database, I agree with "Alhazred" that we can use the binary() function.
However the client
Aditya Shrivastava
When I change the world will change. Let's create a "suffering free world" BKWSU.com

#8
Posted 15 November 2012 - 09:47 AM
mysql is never case-sensitive. and this is irrespective of the OS platform that you use.
SELECT * FROM EMP_TABLE
and
select * from emp_table
has the same meaning and definition. In fact, the results returned for both the queries is identical.
However, in several cases you might find query code where the language is somewhat like this -
select * from EMP_TABLE where NAME='ABC';
or
SELECT * FROM emp_table WHERE name='ABC';
All these patterns and types of coding syntax are used by the programmer himself.
This helps the programmer to keep track of difference between the sql command and the relation name or attribute name.
All the best
Kaustav Banerjee
Author and Owner of Programming Tutorial Blog site -
(http://www.a100websolutions.in)
SELECT * FROM EMP_TABLE
and
select * from emp_table
has the same meaning and definition. In fact, the results returned for both the queries is identical.

However, in several cases you might find query code where the language is somewhat like this -
select * from EMP_TABLE where NAME='ABC';
or
SELECT * FROM emp_table WHERE name='ABC';
All these patterns and types of coding syntax are used by the programmer himself.
This helps the programmer to keep track of difference between the sql command and the relation name or attribute name.
All the best

Kaustav Banerjee
Author and Owner of Programming Tutorial Blog site -
(http://www.a100websolutions.in)
#9
Posted 23 November 2012 - 07:07 AM
mysql is never case-sensitive. and this is irrespective of the OS platform that you use.
What on earth are you people talking about?
http://dev.mysql.com...ensitivity.html
In MySQL, databases correspond to directories within the data directory. Each table within a database corresponds to at least one file within the database directory (and possibly more, depending on the storage engine). Consequently, the case sensitivity of the underlying operating system plays a part in the case sensitivity of database and table names. This means database and table names are not case sensitive in Windows, and case sensitive in most varieties of Unix.
#10
Posted 26 November 2012 - 06:04 AM
Okay, there are three contexts in which MySQL could be considered case sensitive:
1) low-level file structure: OS dependent
2) SQL syntax: no
3) how it treats Varchar data for comparison: this will depend on both the character set and the collation used.
1) low-level file structure: OS dependent
2) SQL syntax: no
3) how it treats Varchar data for comparison: this will depend on both the character set and the collation used.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog
My MineCraft server site: http://banishedwings.enjin.com/
Also tagged with one or more of these keywords: case sensitive, mysql
General Forums →
General Programming →
PHP code having some issueStarted by dennypaul, 09 Mar 2019 ![]() |
|
![]() |
||
Language Forums →
Databases →
Include a specific error, task, problem, or question in your titleStarted by Kriss, 27 Sep 2017 ![]() |
|
![]() |
||
Language Forums →
PHP →
Php Sql Injection Secure TagsStarted by uniqueideaman, 09 Apr 2017 ![]() |
|
![]() |
||
Language Forums →
PHP →
What Is Wrong With Number Of Rows Count Function ?Started by uniqueideaman, 09 Apr 2017 ![]() |
|
![]() |
||
Language Forums →
PHP →
How To Force MySql With Php To Show Final Row Only?Started by uniqueideaman, 09 Apr 2017 ![]() |
|
![]() |
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download