You know the feeling: you read a database question, your brain says “easy marks,” and then your SQL turns into a fog of commas, clauses, and doubt.
In IB Computer Science, the SELECT statement is where that fog clears. Not because it’s short, but because it’s logical. A SELECT query is basically a disciplined way of asking a database one precise question. And in exams, examiners reward that discipline: clear intent, correct terms, and a sensible step-by-step explanation.
If you can explain what each clause does and what changes in the output, you’re already writing like a top-mark student in IB Computer Science.

The core idea: SELECT queries retrieve data
A SELECT query reads data from one or more tables. It does not modify records. That single sentence is exam gold in IB Computer Science because it separates retrieval (safe) from updates (risky).
To strengthen your foundations, pair this with IB Computer Science: Introduction to SQL for Exams.
Quick checklist before you write SQL (exam-friendly)
-
Do I know the table name?
-
Do I know the field(s)/columns I need?
-
Do I need all rows or only some (a condition)?
-
Do results need to be sorted?
-
Can I explain the output in one sentence?
For a bigger roadmap of what database skills matter most, use Databases to Learn for IB Computer Science (Exam Focus).
Basic structure: SELECT then FROM
The simplest pattern in IB Computer Science is:
SELECT field1, field2
FROM TableName;
Think of it like this:
-
SELECT= what you want to see -
FROM= where it lives
A common exam slip is mixing up fields and tables. If you write FROM StudentName, you’ve told the DBMS that a column is a table.
Selecting all fields with * (and why it’s not always wise)
You can ask for everything:
SELECT *
FROM Students;
In IB Computer Science, it’s worth saying (even briefly) that * returns all columns for all matching records. It’s convenient, but it can be inefficient and usually isn’t as precise as selecting only what you need.

Selecting specific fields (cleaner answers, clearer thinking)
Most exam scenarios want specific outputs, like names and grades:
SELECT FirstName, LastName, Grade
FROM Students;
This is a subtle way to show control. You’re not just “using SQL,” you’re shaping the output to match the question. That’s the mindset that pays off across IB Computer Science database questions.
Filtering with WHERE (how you earn explanation marks)
WHERE narrows the results to records that match a condition:
SELECT FirstName, LastName
FROM Students
WHERE Grade = 'A';
In words (exam style): the DBMS checks each row and only returns rows where the condition is true.
You’ll often use comparison operators such as =, <, >, <=, >= or <> (not equal). You don’t need fancy symbols memorised as much as you need the logic: conditions limit which records appear.
If you’re also revising analysis-style SQL, IB Computer Science: COUNT, SUM, AVG in SQL is a good next step.
Sorting results with ORDER BY
ORDER BY changes the display order, not which rows are included:
SELECT FirstName, LastName
FROM Students
WHERE Grade = 'A'
ORDER BY LastName ASC;
ASC is ascending (A to Z, small to large). DESC is descending.
A high-scoring IB Computer Science explanation mentions the sequence: WHERE filters first, then ORDER BY sorts what remains.

How SELECT queries show up in IB Computer Science exams
Expect tasks like:
-
Write a query from a scenario
-
Explain what a query returns
-
Modify a query by adding a condition or sorting
-
Spot an error (missing
FROM, wrong field, clause order)
To practise with real exam pressure, RevisionDojo’s Questionbank and AI Chat are built for quick attempts plus feedback that sounds like a markscheme.
Common mistakes (and the quick fixes)
-
Missing
FROMclause == you never said where the data is. -
Confusing table vs field == tables contain records; fields are columns.
-
Putting
ORDER BYbeforeWHERE== the logic is backwards. -
Vague explanations == name the clause and describe its effect on output.
For broader database revision strategy, see The Best Way to Revise Databases for IB Computer Science.
Closing: make SELECT your calm topic
A good SELECT query is calm. It asks one clean question: choose fields, name the table, filter what you don’t need, and sort the result if it helps readability. That logic is exactly what IB Computer Science examiners are looking for.
If you want to turn this into consistent marks, use RevisionDojo as your base: Study Notes for the concepts, Flashcards for key terms, the Questionbank for timed practice, AI Chat for instant clarification, and Predicted Papers plus Mock Exams to rehearse full database sections with confidence.