MySQL IN

MySQL IN

MySQL IN syntax and examples.

MySQL IN syntax

SELECT * FROM table_name WHERE col IN (val1,val2);

Table books

IDNAMEPRICE
1book120.0
2book225.0
3book315.0

IN example

SELECT * FROM books WHERE id IN (1,3);

Query Result

IDNAMEPRICE
1book120.0
3book315.0