The title says it all. Is MySQL case sensitive? :cool:
5 replies to this topic
#1
Posted 26 August 2007 - 11:37 AM
|
|
|
#2
Guest_Jordan_*
Posted 28 August 2007 - 04:45 AM
Guest_Jordan_*
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]
Quote
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 study Information Systems at Karlstad University when I'm not on CodeCall
I study Information Systems at Karlstad University when I'm not on CodeCall
#5
Posted 21 January 2011 - 02:26 PM
#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';
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account

Back to top









