What is a View?

Published July 23, 2025 By Sai Sree Ram Gundepudi

What is a View?

A view is a virtual table based on the result of a SELECT query. It does not store data itself.

Use Cases:

  • Hide sensitive columns
  • Pre-define complex joins or aggregations
  • Simplify access for end users

Example:

CREATE VIEW emp_summary AS
SELECT department_id, AVG(salary) AS avg_sal
FROM employees GROUP BY department_id;

Was this solution helpful?

Your feedback helps improve our technical knowledge repository.

Share this article