There are three columns in a table namely, Student name
, Subject name
& Marks
. There are three subjects Physics
, Chemistry
& Maths
.. there are marks mentioned in front of them.
Then In this case If we want to run Group By Statement
with Function AVG
. then in the result a new column is created by default.
If I want to change the Column name
of the new One.. How can I change?
You just have to use alias. so use below
select avg(marks) as YourColumnName from ...
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.