Consider the following queries
INSERT INTO DummyTable (TextColumn) VALUES ('Text');
INSERT INTO DummyTable (TextColumn) VALUES ('Text ');
SELECT DISTINCT TextColumn FROM DummyTable
Notice that the second insert contains a whitespace: ‘Text ‘
But DISTINCT ignores the space and returns only one row ‘Text’ – how do you make DISTINCT not to ignore the whitespace?
Turns out I was looking for a BINARY keyword, the DISTINCT then compares raw binary values, including spaces.