sqlColAlias

Syntax

sqlColAlias(colDefs, [colNames])

Arguments

colDefs is metacode.

colNames (optional) is a string indicating an alias name.

Details

Use metacode and an optional alias name to define a column. It is often used to name calculated columns.

Examples

sqlColAlias(<x>, `y);
// output: < x as y >

sqlColAlias(<avg(PRC)>, `avgPRC);
// output: < avg(PRC) as avgPRC >

sqlColAlias(<avg(PRC)>);
// output: < avg(PRC) as avg_PRC >