Table-qualified field names in a join
Names the table a field comes from, like students.name. Needed in a join when both tables share a field name, or SQL gives an ambiguous column error.
Understanding Table-qualified field names in a join in ACARA Digital Technologies Years 9–10
What it does: studentId exists in both tables, so it is qualified as students.studentId. Using table.field removes the ambiguity. The foreign key orders.productId is matched to the primary key products.productId. Each name has its table in front, so SQL knows which column is which. Table names are required only when a field name is shared. Many programmers still add them to make the query clearer. The unqualified studentId could come from students or results. Writing students.studentId fixes the error.
Common mistakes: Both students and classes have a classId field, so a bare classId gives an ambiguous column error. It should be classes.classId. A table-qualified field uses a full stop (dot) between the table and the field, not a comma. It should be classes.room.
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 459–475) and word search (Modules 459–534).
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
table.fieldFill in the Blanks
Spot the Error
Student with a class code? Join your class →