Skip to content

SELECT: LENGTH

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

// SELECT LENGTH(`field`) FROM `table`
const query = myQueryBuilder
    .SELECT({ $LENGTH: { field: 'fieldLENGTH' } })
    .from('table')
    .get();

// SELECT LENGTH(`field`) AS `fieldLENGTH` FROM `table`
Clone this wiki locally