SQL - Structured Query Language |
Use Built-in Function - VIEWThe following example defined with built-in function. When use built-in function, the derived column must include a column name in the CREATE VIEW statement. The following query is used to display department wise max salary employee information. -- Example 61 --
USE EBusiness GO
CREATE VIEW DeptMaxSalary (Emp_Name, Max_Salary) AS SELECT Dept_Code, MAX(Salary) FROM EMP GROUP BY Dept_Code GO
SELECT * FROM DeptMaxSalary Query Output Screen |
* * * * *