11

Вопрос по sql, sqlite – SQLite LIKE & ORDER BY Совпадение запроса

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

SELECT name FROM table WHERE name LIKE "%John%" ORDER BY name LIMIT 10;

Error: User Rate Limit Exceeded

  1. If the field is equal (e.g. "John")
  2. If the field starts with "John" (e.g. "John Doe")
  3. If the field contains "John" (e.g. "Jane John Doe")

Error: User Rate Limit Exceeded

SELECT name FROM table WHERE name LIKE "%John%" ORDER BY CASE WHEN name = "John" 
THEN 1 ELSE 2 END, CASE WHEN name LIKE "John%" THEN 1 ELSE 2 END, name LIMIT 10;

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

2ответа

6

Error: User Rate Limit Exceeded

ORDER BY name = "John" DESC, name LIKE "John%" DESC

Error: User Rate Limit Exceeded

16

Error: User Rate Limit Exceeded

SELECT name 
FROM table 
WHERE name LIKE "%John%" 
ORDER BY (CASE WHEN name = "John" THEN 1 WHEN name LIKE "John%" THEN 2 ELSE 3 END),name LIMIT 10 ;

RelatedQuestions