In SELECT AVG (salary) FROM employees.. dont we need to add AS salary after AVG (salary) ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

In SELECT AVG (salary) FROM employees.. dont we need to add AS salary after AVG (salary) ?

12th Nov 2016, 8:15 AM
shreeya shrestha
3 Answers
0
No... Coz we r not selecting the average of salaries as salary .....we want only the average of salaries as the result
12th Nov 2016, 8:29 AM
Nilima Purohit
Nilima Purohit - avatar
0
it bassed on our needs if you want new name for the result so you use the AS to give the name for it
7th Jun 2017, 5:15 AM
Gowtham p
Gowtham p - avatar
0
if U need to provide a new name for a column to be returned with data - so we use 'AS'
5th Jul 2017, 2:23 PM
Anatolii