SELECT * FROM table WHERE id in (1,1)
Или n строк в запросе вида
SELECT * FROM table WHERE id in (1,1,3,..,n)
Количество строк=количеству чисел.
SELECT * FROM table WHERE id in (1,1)
SELECT * FROM table WHERE id in (1,1,3,..,n)
Цитата |
вернуть 2 строки с помощью такого запроса |
Цитата |
Количество строк=количеству чисел |
SELECT * FROM table WHERE id in (1,1,3,..,n) GROUP BY id
SELECT * FROM table WHERE id in (1,1)
SELECT * FROM table WHERE id in (1,1) GROUP BY id
SELECT * FROM table WHERE id in (1,1) LIMIT 2
SELECT `c_url` FROM `cat` WHERE c_id in (SELECT `a_c` FROM `art` WHERE c_id in(1,3,5))
SELECT `a_c` FROM `art` WHERE c_id in(1,3,5)может вернуть (1,1,2)
SELECT `c_url` FROM `cat` WHERE c_id in(1,1,2)