Answer the question
In order to leave comments, you need to log in
How to sort by text field and occurrence of substring?
How to sort by a text field exactly by the occurrence of a substring? description is a description and in the selection, first get the products with certain occurrences in this field.
SELECT * FROM goods ORDER BY description
Answer the question
In order to leave comments, you need to log in
SELECT * FROM goods
ORDER BY CASE WHEN [с определенными вхождениям] THEN 0 ELSE 1 END, description
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question