Photo AI
Last Updated Sep 26, 2025
Revision notes with simplified explanations to understand SQL quickly and effectively.
497+ students studying
SQL (Structured Query Language) is a standard language used to manage and query databases. It allows users to retrieve, manipulate, and update data stored in relational databases. One of the most common uses of SQL is to search for data within tables.
SELECT * FROM Customers;
This will retrieve all columns from the Customers table.
SELECT ContactName, Address FROM Customers;
This retrieves only the ContactName and Address columns from the Customers table.
SELECT ContactName, Address FROM Customers WHERE ContactName = 'Mr Smith';
This retrieves the ContactName and Address of customers where the ContactName is "Mr Smith."
Operator | Description | Example |
---|---|---|
= | Equal to | WHERE City = 'London' |
<> or != | Not equal to | WHERE Age != 30 |
> | Greater than | WHERE Age > 18 |
< | Less than | WHERE Age < 65 |
>= | Greater than or equal to | WHERE Price >= 10 |
<= | Less than or equal to | WHERE Price <= 50 |
BETWEEN | Used to search for values within a range | WHERE Age BETWEEN 18 AND 30 |
LIKE | Searches for patterns in text fields | WHERE ContactName LIKE 'Smi%' |
IN | Specify multiple values for a column | WHERE City IN ('London', 'Paris') |
Boolean Operator | Description | Example |
---|---|---|
AND | Both conditions must be true | WHERE Country = 'UK' AND Age >= 18 |
OR | At least one condition must be true | WHERE Age < 18 OR Age > 65 |
Parentheses () | Used to group conditions for complex queries | WHERE Country = 'England' AND (City = 'London' OR City = 'Oxford') |
Enhance your understanding with flashcards, quizzes, and exams—designed to help you grasp key concepts, reinforce learning, and master any topic with confidence!
80 flashcards
Flashcards on SQL
Revise key concepts with interactive flashcards.
Try Computer Science Flashcards8 quizzes
Quizzes on SQL
Test your knowledge with fun and engaging quizzes.
Try Computer Science Quizzes8 questions
Exam questions on SQL
Boost your confidence with real exam questions.
Try Computer Science Questions1 exams created
Exam Builder on SQL
Create custom exams across topics for better practice!
Try Computer Science exam builder13 papers
Past Papers on SQL
Practice past papers to reinforce exam experience.
Try Computer Science Past PapersDiscover More Revision Notes Related to SQL to Deepen Your Understanding and Improve Your Mastery
Join 500,000+ GCSE students using SimpleStudy...
Join Thousands of GCSE Students Using SimpleStudy to Learn Smarter, Stay Organized, and Boost Their Grades with Confidence!
Report Improved Results
Recommend to friends
Students Supported
Questions answered