Skip to content
Learnearn.uk » OCR GCSE Computer Science Home » SQL Queries

SQL Queries

SELECT Query

This is the main query that is needed for the OCR GCSE Specification in the exam. This is the query used to retrieve data stored in a database.

There are many other SQL queries but it is unlikely that you will be test on them.

Examples Queries

SELECT Queries with Wildcard

SELECT * FROM Customers;

This would select all the columns from the customer table.

SELECT Queries with where

SELECT Name, Telephone FROM Customers WHERE OrderID = 521;

This would select the Name and Telephone Columns from the Customers  table for any record where the OrderId = 521;

SELECT Queries with Logical Operators

SELECT  Name, Address FROM Customers WHERE Age > 55;

This would return the name and address of all cutomers who are over 55 years old