Views in a relational database
CREATE VIEW makes a view: a stored query shown as a virtual table. It shows chosen data without a second copy, and can restrict access or simplify joins.
Understanding Views in a relational database in QCE Digital Solutions Unit 2
What it does: The view selects only the names, so users given access to it cannot see the other columns in the students table. The join and ON condition are saved inside the view. Users can then run SELECT * FROM MarkList instead of writing the join each time. CREATE VIEW needs the AS keyword between the view name and the SELECT query.
Common mistakes: There is a trailing comma after the last column in the SELECT list, so the stored query is invalid. It should be SELECT firstName, points with no comma before FROM. The alias x is never defined in the FROM clause. students was given the alias s, so it should be s.firstName. A view that simplifies a join still needs correct aliases.
Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.
This module's key terms are also in a printable crossword (Modules 186–228) and word search (Modules 144–228).
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
CREATE VIEWFill in the Blanks
Spot the Error
Student with a class code? Join your class →