Like Wildcard Escaping Ids

Matching a machine-generated id inside a text or JSON column with LIKE — why `_` and `%` in the id silently widen the match, how to escape them with nested replace() plus an explicit ESCAPE character, and why the id must be matched as a quoted token rather than as a bare substring. Reach for it when a cleanup spares rows it should have deleted, when a lookup returns a row belonging to a different id, or before putting any id into a LIKE pattern.

maxrave-dev 40a8b23 5.4 KB Updated

File contents

maxrave-dev/kotlin-footguns/tree/main/skills/like-wildcard-escaping-ids commit 40a8b23c95

Frequently asked questions

npx skillmds@latest add maxrave-dev/like-wildcard-escaping-ids