O
O
Optimus2014-09-07 21:53:42
MySQL
Optimus, 2014-09-07 21:53:42

How to select multiple rows in mysql?

Works:
SELECT * FROM `table` WHERE `id`='30'
I wanted to select not one id=30, but several id at a time, for example 30, 31, 32 but I don’t write conditions, it doesn’t work out ...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
Cool Admin, 2014-09-07
Pyan @marrk2

SELECT * FROM table WHERE id IN (5,4,3,1,6)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question