GCSE Computer Science (CIE)

Topic Summaries

ALGORITHMS AND PROGRAMMING: Programming techniques

Structured Query Language (SQL)

  • SQL is used to access and manipulate data in a relational database (i.e. tables) made up of rows (records) and columns (fields).
SQL keyword Description Python example
SELECT Choose which fields (columns) to display

SELECT name, age

FROM students

WHERE age > = 16

FROM Choose the table to search
WHERE Set conditions to filter results
  • For example, if we wanted to: “Select all names from the ‘books’ table where genre is ‘Sci-Fi’ in alphabetical order,” then our SQL entry would be as shown on the right

SELECT name

FROM books

WHERE genre = “Sci-Fi

ORDER BY name DESC

Unlock Structured Query Language (SQL)

Sign up to unlock the rest of this topic — plus every other topic, video, flashcard set and eBook guide in your SnapRevise Digital subscription.

Cancel anytime — instant access the moment you sign up.