Prev Next
SQL AVG() function returns the average value of a column. The column should be numeric. Syntax for SQL AVG() function is given below.
SQL Syntax for AVG() function:
| Syntax for AVG() function in SQL | SELECT AVG(column_name) FROM table_name; |
Please consider the following table with few records as given below.
Table name (for example): student
Column names in this table: Student_ID, Student_name, City and Marks
Available records: 4 rows
