Skip to content

SELECT: LEFT

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

// SELECT LEFT(`field`, 2) FROM `table`
const query = myQueryBuilder
    .SELECT({ $LEFT: { field: 'fieldLEFT' }, $ARGS: [2] })
    .from('table')
    .get();

// SELECT LEFT(`field`, 2) AS `fieldLEFT` FROM `table`
Clone this wiki locally