Views
A view is just a relation, but we store a definition, rather than a set of tuples.
CREATE VIEW YoungActiveStudents (name, grade)
AS SELECT S.name, E.grade
FROM Students S, Enrolled E
WHERE S.sid = E.sid and S.ageច
- Views can be dropped using the DROP VIEW command.
- How to handle DROP TABLE if there’s a view on the table?
- DROP TABLE command has options to let the user specify this.