How to use an Alias in MySQL calculations?
Answers
Answered by
0
Answer: My SQL, we can use the column alias in the ORDER BY, GROUP BY and HAVING clauses to refer to the column .
Explanation: Aliases in sql are not like variables in a programming language . Aliases can only be referenced again at certain points. But we can't reuse an alias in the SELECT clause . So we can use a derived query which lets we basically rename your columns and / or name any computed columns.
Similar questions