Explanation: Views are virtual tables based on the result of a SELECT query.
- Why It Matters: They simplify complex queries and provide a layer of security by restricting access to specific data.
- Example: Create a view for employee details:
CREATE VIEW employee_details AS SELECT first_name, last_name, salary FROM employees WHERE department_id = 1;
Leave a Reply