← Years 7–8 Data & Information

Choosing which fields a query shows

A query that lists the fields to show. Only Name and Score appear, in that order, so other columns are left out. SELECT * shows every field.

Understanding Choosing which fields a query shows in Years 7–8 Data & Information

What it does: The result columns appear in the order the fields are listed after SELECT. Fields in a SELECT list are separated by commas. Without the comma the query is not valid. The * is a shortcut that means all fields, so every column appears in the result. There must be no comma after the last field. A comma before FROM causes an error. A query must say which fields to show, either by naming them or by using * for every field.

Common mistakes: The fields to show must be separated by a comma. It should be SELECT Name, Score. The keyword is spelled wrong. It should be FROM Students, which names the table the fields come from.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

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 47–80) and word search (Modules 9–80).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
You only want to see each student's Name and Score. Which query does that?
SELECT Name, Score FROM StudentsSELECT Name Score FROM Students
Matches
SELECT Name Score FROM Students
↓
The field names are missing a comma between them. It should be SELECT Name, Score FROM Students.
Applying
Meanings
Term
SELECT Name, Score FROM Students
Meaning
A query that lists the fields to show. Only Name and Score appear, in that order, so other columns are left out. SELECT * shows every field.
Practice
SELECT Name, Score
Testing
Gaps
Name, Score FROM Students
Check Answer
Spots
1SELECT Name Score
2FROM Students

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Walrus' badge — Method Master, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. You only want to see each student's Name and Score. Which query does that?
A. SELECT Name, Score FROM Students ✓
B. SELECT Name Score FROM Students
Fields in a SELECT list are separated by commas. Without the comma the query is not valid.
2. What does SELECT * FROM Students show?
A. Every field in the Students table ✓
B. Only the first field in the table
The * is a shortcut that means all fields, so every column appears in the result.
3. SELECT Name, Score FROM Students. What happens to the other columns, like Age and Year?
A. They are left out of the result ✓
B. They are shown at the end of the result
A query only shows the fields you list. Any other columns are left out.
4. Which query shows Score first and then Name?
A. SELECT Name, Score FROM Students
B. SELECT Score, Name FROM Students ✓
The result columns appear in the same order as the fields in the SELECT list.
5. You want every column from the Students table without typing each field name. Which is best?
A. SELECT All FROM Students
B. SELECT * FROM Students ✓
Use * to select all fields. 'All' is not a field name, so the query would fail.

Match the Pairs

SELECT Name, Score FROM Students → Shows only the Name and Score columns for every student, and leaves out all other fields
SELECT * FROM Students → Shows every field in the Students table
Show only a student's Score and then their Name, in that order → SELECT Score, Name FROM Students
Show just one field, Name, so the other columns are hidden → SELECT Name FROM Students
SELECT Name Score FROM Students → The field names are missing a comma between them. It should be SELECT Name, Score FROM Students.
SELECT FROM Students → No fields are listed after SELECT. Add field names, or use * to show all fields.

Key Term

SELECT Name, Score FROM Students
A query that lists the fields to show. Only Name and Score appear, in that order, so other columns are left out. SELECT * shows every field.

Fill in the Blanks

1. SELECT Name, Score FROM Students
Hint: Type the keyword that starts a query and chooses which fields to show.
2. SELECT Name, Score FROM Students
Hint: Type the second field to display, the one that holds each student's marks.
3. SELECT * FROM Students
Hint: Type the single symbol that means show every field.
4. SELECT Name, Score FROM Students
Hint: Type the keyword that comes before the table name.
5. SELECT Score, Name FROM Students
Hint: Type the field that should appear first in the result, before Name.

Spot the Error

Question 1
A SELECT Name Score
B FROM Students
C WHERE Score > 50;
Line A — The fields to show must be separated by a comma. It should be SELECT Name, Score.
Question 2
A SELECT Name, Score
B FORM Students
C ORDER BY Score DESC;
Line B — The keyword is spelled wrong. It should be FROM Students, which names the table the fields come from.
Question 3
A SELECT Name, Score
B FROM Students
C WHERE Score >= 80
D ORDER BY Marks;
Line D — The table has no field called Marks. The field in the SELECT list is Score, so it should be ORDER BY Score.
Question 4
A SELECT *
B FROM Students
C WHERE Year == 8;
Line C — A query uses a single = to compare values. It should be WHERE Year = 8;. SELECT * shows every field for the matching rows.
Question 5
A SELECT Name, Score
B FROM Students
C WHERE Year = 7
D ORDER BY Score DOWN;
Line D — To sort from highest to lowest, the keyword is DESC, not DOWN. It should be ORDER BY Score DESC;.

Student with a class code? Join your class →