In mySQL I have to use WHERE BINARY UPPER(col1) = col1 but in Oracle it works with no problem. Can someone explain to me why this is? I am new to mySQL.
So looking at it with the following statement
select upper(col1),col1
from mytable
where upper(col1) = col1;
Result in Oracle:
UPPER(COL1) COL1
-------------------- --------------------
JÜRGEN JÜRGEN
RENÉ RENÉ
CARL CARL
Result in MySQL
UPPER(COL1) COL1
-------------------- --------------------
JÜRGEN JÜRGEN
JÜRGEN Jürgen
RENÉ René
RENÉ RENÉ
CARL Carl
CARL CARL
String comparisons are not case-sensitive in MySQL nor SQLServer by default.
How can I make SQL case sensitive string comparison on MySQL?
http://dev.mysql.com/doc/refman/5.0/en/case-sensitivity.html
Why is SQL Server '=' comparator case insensitive?
http://msdn.microsoft.com/en-us/library/aa174903%28SQL.80%29.aspx