sqlite-regex icon indicating copy to clipboard operation
sqlite-regex copied to clipboard

REGEXP does not heed COLLATE NOCASE

Open mcsilver opened this issue 1 year ago • 0 comments

Is it just me or does the following query generate unexpected results:

CREATE TABLE Names (
  Name TEXT COLLATE NOCASE
);

INSERT INTO Names VALUES ('Michael');

SELECT * FROM Names WHERE Name = 'michael' -- one row returned
SELECT * FROM Names WHERE Name REGEXP '^michael$' -- zero rows returned
SELECT * FROM Names WHERE Name REGEXP '^Michael$' -- one row returned

mcsilver avatar Feb 28 '24 23:02 mcsilver