Is it possible to calculate the values of the output columns?
For example, if I have the following
select col1, col2
from table1
Without using a stored procedure, is it possible to do something like this
pseudo code
select col1 as figure1, col2 as figure2, figure2 - figure1
from table1
EDIT 1:
Only reason why I was trying not to do col2 – col1 was because col1 and col2 are created via calculations already, and I didn’t want to double up on the calculations.
You can not use aliases directly. But you can use cte or subquery