EasyAdvanced PostgreSQL

Create a basic View

The query

SQL
CREATE VIEW active_employees AS
SELECT emp_id, first_name, last_name, dept_id 
FROM employees 
WHERE status = 'active';
Tested against PostgreSQL 16

Note

A View is a saved query. It does not store data itself, it runs the query dynamically every time you select from the view.

Tables referenced