What is the equivalent of LIKE with wildcard the end 'abc%' using greater/less than operators?
1
vote
2
answers
468
views
I just found out that some specific patterns when used with LIKE text operator uses BTREE indexes to speed up queries, such as:
- 'abc123' (text with no wildcard)
- 'abc%' (text with only one wildcard in the end)
What is the equivalent of LIKE text operator using a pattern with only one wildcard
'%'
present in the pattern's end (such as "a_column" LIKE 'abc%'
) using just greater/less/equal than operators?
My interest is achieving this in PostgreSQL, but this may be an SQL standard question.
Asked by Tiago Stapenhorst
(237 rep)
Sep 20, 2022, 06:00 PM
Last activity: Sep 21, 2022, 06:50 AM
Last activity: Sep 21, 2022, 06:50 AM