If I do SELECT a AS b and b is not a column in the table, would query create the \"virtual\" column?
in fact, I need to incorporate some virtual column into the quer
You can add virtual columns as
SELECT '1' as temp
But if you tries to put where condition to additionally generated column, it wont work and will show an error message as the column doesn't exist.
We can solve this issue by returning sql result as a table.ie,
SELECT tb.* from (SELECT 1 as temp) as tb WHERE tb.temp = 1