Skip to content

WHERE: NE

Ali Amirnezhad edited this page Jul 24, 2019 · 1 revision
const query = myQueryBuilder
    .SELECT()
    .from('table')
    .where({ field: { $NE: 'value' } })
    .get();

// SELECT * FROM `table` WHERE ((`field` <> 'value'))
const query = myQueryBuilder
    .SELECT()
    .from('table')
    .where({ field: { $NE: 2 } })
    .get();

// SELECT * FROM `table` WHERE ((`field` <> 2))
const query = myQueryBuilder
    .SELECT()
    .from('table')
    .where({ field: { $NE: { $DATE: new Date() } } })
    .get();

// SELECT * FROM `table` WHERE ((`field` <> '1979-06-03'))
const query = myQueryBuilder
    .SELECT()
    .from('table')
    .where({ field: { $NE: { $YEAR: new Date() } } })
    .get();

// SELECT * FROM `table` WHERE ((`field` <> 1979))
Clone this wiki locally