Answer the question
In order to leave comments, you need to log in
Sort by earlier occurrence of a string in a query?
There is such a request. By the string transmitted by the user, we are looking for something in the database
SELECT email FROM users WHERE email ILIKE :query ORDER BY email
SELECT email FROM users WHERE email ILIKE "%test%" ORDER BY email
Answer the question
In order to leave comments, you need to log in
It is necessary to sort by the Levenshtein distance from the "test" expression to the email field.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question