Skip to content

WHERE: IN

Ali Amirnezhad edited this page Jul 24, 2019 · 1 revision
const query = myQueryBuilder
    .SELECT()
    .from('table')
    .where({ field: { $IN: ['a', 'b', 'c', 'd'] } })
    .get();

// SELECT * FROM `table` WHERE ((`field` IN ('a', 'b', 'c', 'd')))
const query = myQueryBuilder
    .SELECT()
    .from('table')
    .where({ field: { $IN: [1, 2, 3, 4, 5] } })
    .get();

// SELECT * FROM `table` WHERE ((`field` IN (1, 2, 3, 4, 5)))
Clone this wiki locally