I have noticed in MySQL a where clause like WHERE x = 'Test'
will match regardless of case ('TEST', 'test', etc.)
When using PDO, is it fair to assume that this is the case with most database servers? For example, If I were to use MSSQL or Oracle, would this be the same case?
It's not the server that it depends on, but the collation. Most databases will default to a case insensitive collation, so you can assume that, but if you ever run into one that is case sensitive it is easy to change.
Oracle is case sensitive with data by default e.g.
select * from 'test';
does not equal
select * from 'TEST';
Been a while since I last used them but I seem to recall Informix beiung case sensitive and Sybase I think is dependant on the collation.
As noted by other respondandt SQL Server is dependant on the collation.
So I think the only real answer is it depends on the RDBMS
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With