Hello, I'm trying to make a temporary row in mysql but I can't do it, if I can do it how to create a column but I don't know how to make a row. Can somebody help me?
This is the original column
_________________ ______________
| Salario | | AVERAGE |
_________________ |____________ |
| 200.000 | |85585.714286 |
| ________________| |______________|
^------- This is the original result
what i tried
This is the desired result --------------------------^
What I tried was:select "Average Salary", avg(salary) from EMP_DATA;
and create this
+----------------+--------------+
| Average Salary | avg(salary) |
+----------------+--------------+
| Average Salary | 85585.714286 |
+----------------+--------------+
I was able to do the column but that's not what I want to do. I want the value of avg(salary)
this below Average Salary like so:
+----------------+
| Average Salary |
+----------------+
| 85585.714286 |
+----------------+
Apparently you're trying to alias the column?:
That is not a temporary row, it is a field that you include in your query, temporary tables can be made, but that is from transact sql, what the alias does is give a more understandable name to the column.