New
New
Year 11
OCR

SQL searches

I can use SQL to retrieve data from a relational database.

New
New
Year 11
OCR

SQL searches

I can use SQL to retrieve data from a relational database.

These resources will be removed by end of Summer Term 2025.

Switch to our new teaching resources now - designed by teachers and leading subject experts, and tested in classrooms.

These resources were created for remote use during the pandemic and are not designed for classroom teaching.

Lesson details

Key learning points

  1. SQL stands for Structured Query Language. It is a language used to communicate with a database.
  2. You can use SQL to manipulate databases and retrieve records.
  3. An SQL SELECT statement allows you to retrieve data from a database.
  4. The SQL SELECT * statement allows you to return all the data and fields from a table.

Keywords

  • SELECT - An SQL SELECT statement allows you to retrieve data from a database.

  • SELECT * - The SQL SELECT * allows you to return all the columns from a database table.

Common misconception

Using SELECT * is always the best method for returning data from a database table.

You should only use the SELECT * query when all fields are needed. Including unnecessary data can be frustrating for the person viewing and working with the results.


To help you plan your year 11 computer science lesson on: SQL searches, download all teaching resources for free and adapt to suit your pupils' needs...

File needed for this lesson

  • dbMusic 120 KB (DB)

Download this file to use in the lesson.

This lesson can be completed without using a DBMS, but pupils could complete the activities practically using MySQL. Modelling concepts using software helps pupils appreciate why they are learning particular concepts.
Teacher tip

Equipment

A database file is provided as additional resource for this lesson.

Licence

This content is © Oak National Academy Limited (2025), licensed on Open Government Licence version 3.0 except where otherwise stated. See Oak's terms & conditions (Collection 2).

Lesson video

Loading...

Prior knowledge starter quiz

Download quiz pdf

5 Questions

Q1.
What is SQL mainly used for?
designing graphics
writing essays
creating presentations
Correct answer: communicating with databases
Q2.
Which of these is NOT a function of SQL?
Correct answer: drawing diagrams
adding data to a table
changing data in a table
retrieving data from a database
Q3.
What does the acronym SQL stand for?
Simple Question Language
Correct answer: Structured Query Language
Secure Quick Link
Standard Quality List
Q4.
Match the example to the correct keyword
Correct Answer:add a new student’s details,INSERT

INSERT

Correct Answer:change a student’s address,UPDATE

UPDATE

Correct Answer:store all student information,Database

Database

Correct Answer:use a language to talk to the database,SQL

SQL

Q5.
Arrange these actions for adding data to a table:
1 - decide what data to add
2 - use the INSERT statement
3 - enter the new data
4 - confirm the addition

Assessment exit quiz

Download quiz pdf

6 Questions

Q1.
What does the SQL SELECT statement do?
deletes data
adds new data
Correct answer: retrieves data
updates data
Q2.
What SQL command would you use to return every field and all data from a table at once?
Correct Answer: SELECT *
Q3.
Match each SQL keyword or clause to its function:
Correct Answer:SELECT,retrieve data from a database

retrieve data from a database

Correct Answer:SELECT *,retrieve all columns and rows from a table

retrieve all columns and rows from a table

Correct Answer:FROM,specify which table to get data from

specify which table to get data from

Correct Answer:WHERE,filter results to match certain criteria

filter results to match certain criteria

Q4.
Arrange these actions for using SELECT * in a database:
1 - Decide if you really need every field.
2 - Write SELECT * FROM table.
3 - Run the query.
4 - Look at all the data returned.
Q5.
Which of these is the best practice when you only need a few fields from a table?
use SELECT *
Correct answer: list only the fields you need after SELECT
use DELETE
use all tables at once
Q6.
Which SQL statement is used to retrieve data from more than one table?
Correct answer: SELECT with a JOIN
DELETE
UPDATE
INSERT