Given:
- A table tA with an "ID" and a "Description" columns
- "Description" is a string column.
The contents of the table are:
ID || Description
1 || "String1"
2 || "String2"
3 || "String3"
If I execute the following SQL query:
"SELECT ID FROM tA WHERE Description = 'String2'" it returns 2 (as expected)
But:
If I execute the following SQL query:
"SELECT ID FROM tA WHERE Description = 'String2 '" (trailing withespaces) it also returns 2! (as it is an exact comparison, it should return NONE)
If I execute the following SQL query:
"SELECT ID FROM tA WHERE Description = ' String2'" (leading withespaces) it returns NONE (as expected)
Do you know what is the reason of this difference in behaviour?
Thanks in advance.