Complex View

  • Based on multiple tables, joins, or aggregate functions
  • May include GROUP BY, DISTINCT, etc.
  • Usually read-only

CREATE VIEW complex_emp_view AS
SELECT emp_id,dept_id, first_name, salary
FROM emp1 
group by emp_id,dept_id, first_name, salary;

select * from complex_emp_view;