When is comparing strings case-sensitive and when case-insensitive in popular databases such as PostgreSQL
, MySQL
, MariaDB
, Oracle
, SQL Server
, and SQLite
?
I mean comparison using operators like: 'ab' = 'AB'
, or comparison of strings performed inside string functions like: POSITION('b' IN 'ABC')
, INSTR('ABC', 'b')
, REPLACE('ABC', 'b', 'x')
, TRANSLATE('ABC', 'b', 'x')
, TRIM('XabcX', 'x')
.
I think that I can know the answer but I don't know if it is correct.
Additionally, does the SQL standard define the case-sensitivity of string comparison?
Unfortunately, I only found a question about case-sensitivity of SQL syntax, and not in string comparison.
Edit: I am asking about default setting of the RDBMS, without additional setting the collation of a database, table, nor column.
I am asking only about ASCII letters A-Z and a-z.