Ever wondered how websites store and retrieve massive amounts of...
Ultimate SQL Cheat Sheet for Easy Database Queries

N5 SQL Essential Commands
SELECT statements are your go-to tool for finding specific information in a database. You'll need four key components: what fields you want (SELECT), which table to look in (FROM), your search conditions (WHERE), and how to sort results (ORDER BY).
Here's the magic formula: SELECT name, age FROM pupil WHERE age <18 ORDER BY name; This grabs names and ages of pupils under 18, sorted alphabetically. Remember to use speech marks around text values, and you can combine conditions using AND, OR, and NOT.
INSERT statements let you add fresh data to tables. The simplest approach adds values for every field: INSERT INTO Instructor VALUES (5, 'D Thomas', '1985/11/30',5); Just remember that field order matters massively here!
Sometimes you only need to fill certain fields. In that case, specify exactly which ones: INSERT INTO Instructor (InstructorID, Name) VALUES (5, 'D Thomas'); SQL dates follow the yyyy/mm/dd format, so '1985/11/30' means 30th November 1985.
Top Tip: Always double-check your field order when inserting data - getting this wrong is one of the most common SQL mistakes!
DELETE and UPDATE statements handle removing and changing existing data. DELETE works like: DELETE FROM Course WHERE CourseID = 'BMX05'; Be careful though - forget the WHERE clause and you'll delete everything! UPDATE follows this pattern: UPDATE Course SET Date = '2017/12/11' WHERE DATE = '2017/12/10';
EQUI joins connect related tables using matching key fields. This powerful technique lets you pull information from multiple tables simultaneously: SELECT Instructor.Name, Course.Title FROM Instructor, Course WHERE Course.InstructorID = Instructor.InstructorID;
We thought you’d never ask...
Similar content
Most popular content in Computer Science
9GCSE Computer Science Overview
Comprehensive study material for OCR GCSE Computer Science covering key topics such as computer architecture, network security, programming techniques, and ethical considerations. Ideal for exam preparation, this resource includes essential concepts, exam questions, and definitions to enhance understanding and retention.
A-Level Computer Science Paper 1 (Revision sheet)
(Apologies if some things look a bit off, converting the PowerPoint to PDF was a struggle as it wouldn’t let me include my custom drawings for diagrams)
GCSE Computer Science // Revision Notes
Concise revision notes for the GCSE OCR computer science specification (J277). Contains all the info needed for paper 1. Paper 2 is in my bio.
Python Basics for Year 8
Master the fundamentals of Python programming with this comprehensive guide tailored for Year 8 students. Explore key concepts such as variables, loops, conditional statements, and arithmetic operators. This resource includes practical examples and interactive coding exercises to enhance your understanding and prepare you for assessments.
Fundamentals of Computer Networking
Explore the essential concepts of computer networking, including types of networks (LAN, WAN, Internet), key components (nodes, links, protocols), and basic principles like IP and MAC addresses. This summary provides a comprehensive overview of network technologies and their significance in resource sharing, communication, and collaboration.
GCSE Computer Science Algorithms
Comprehensive overview of algorithms for AQA GCSE Computer Science Paper 1, covering key concepts such as sorting (Bubble Sort, Merge Sort), searching (Linear and Binary Search), and essential programming principles like data types, pseudocode, and flowcharts. Ideal for exam preparation and understanding algorithm efficiency.
CPU Architecture Essentials
Explore the fundamental components of CPU architecture, including the Fetch-Decode-Execute cycle, factors affecting CPU performance, and the role of embedded systems. This summary covers key concepts such as clock speed, cache size, and the Von Neumann architecture, providing a comprehensive overview for students studying computer systems.
GCSE Computer Science Revision
Comprehensive revision notes for OCR GCSE Computer Science Component 1 (J277). Covers key topics including networking, cybersecurity, data compression, computer architecture, and ethical issues. Ideal for exam preparation and understanding core concepts. Access original slides for further details.
Sorting Algorithms Overview
Explore key sorting algorithms including Bubble, Insertion, and Merge sort. This summary covers their definitions, advantages, disadvantages, and practical examples to aid your GCSE Computer Science exam preparation.
Most popular content
9Comprehensive Crime & Deviance Overview
Explore an extensive revision of crime and deviance topics, including theories, types of crime, and the impact of media. This resource covers key concepts such as Marxism, functionalism, gender and crime, and the influence of globalization on criminal behavior. Ideal for students seeking a thorough understanding of criminology and its various theories. Type: Full Topic Revision.
Criminology: Crime & Punishment Overview
Comprehensive mindmaps covering key concepts in the Crime and Punishment topic for WJEC Criminology Unit 4. This resource includes detailed insights into the Criminal Justice System, crime prevention strategies, sentencing models, and the roles of various agencies. Ideal for A-Level revision, ensuring you grasp essential theories and legislative processes to excel in your exams.
Sociology of Families: Comprehensive Revision
Dive into an extensive overview of family dynamics, perspectives, and patterns in sociology. This resource covers key concepts such as family diversity, gender roles, marriage, and the impact of social policies on family structures. Perfect for A-Level Sociology students preparing for Paper 2.
WJEC Unit 4 Criminology
Criminology unit 4 detailed revision note
Sociological Theories Overview
Comprehensive revision of key sociological theories including Functionalism, Marxism, Feminism, and Interpretivism. Explore concepts like value freedom, identity formation, and the critique of social control. Ideal for AQA A-Level Sociology students preparing for exams. This summary covers essential theories and their implications in sociology, providing a clear understanding of each perspective.
Sociology of Education Overview
Explore comprehensive A-Level Sociology notes on the education system, covering key theories, policies, and sociological perspectives. This resource includes insights on marketisation, gender roles, cultural deprivation, and educational inequalities, providing a thorough understanding of how education shapes social stratification and individual achievement. Ideal for exam preparation and in-depth study.
Media Studies: Key Concepts & Theories
Dive into the essential concepts and theories of media studies for AQA A-level Sociology. This comprehensive revision guide covers topics such as media influence, representations, globalization, and sociological perspectives, ensuring you grasp the critical elements needed for your exams. Perfect for students seeking to enhance their understanding of media's role in society.
Crime and Deviance AQA A-level sociology
AQA A-level crime and deviance topic notes
A-Level Biology Year 1 Overview
Comprehensive summary of AQA A-Level Biology Year 1, covering key topics such as cellular structure, protein synthesis, immune response, gas exchange, and more. Ideal for exam preparation and understanding biological concepts. Includes detailed insights into cellular processes, biological classification, and the circulatory system.
Students love us — and so will you.
The app is very easy to use and well designed. I have found everything I was looking for so far and have been able to learn a lot from the presentations! I will definitely use the app for a class assignment! And of course it also helps a lot as an inspiration.
This app is really great. There are so many study notes and help [...]. My problem subject is French, for example, and the app has so many options for help. Thanks to this app, I have improved my French. I would recommend it to anyone.
Wow, I am really amazed. I just tried the app because I've seen it advertised many times and was absolutely stunned. This app is THE HELP you want for school and above all, it offers so many things, such as workouts and fact sheets, which have been VERY helpful to me personally.
Ultimate SQL Cheat Sheet for Easy Database Queries
Ever wondered how websites store and retrieve massive amounts of data? SQL (Structured Query Language) is the secret weapon that lets you communicate with databases to find, add, edit, and delete information. Think of it as having a conversation with...

N5 SQL Essential Commands
SELECT statements are your go-to tool for finding specific information in a database. You'll need four key components: what fields you want (SELECT), which table to look in (FROM), your search conditions (WHERE), and how to sort results (ORDER BY).
Here's the magic formula: SELECT name, age FROM pupil WHERE age <18 ORDER BY name; This grabs names and ages of pupils under 18, sorted alphabetically. Remember to use speech marks around text values, and you can combine conditions using AND, OR, and NOT.
INSERT statements let you add fresh data to tables. The simplest approach adds values for every field: INSERT INTO Instructor VALUES (5, 'D Thomas', '1985/11/30',5); Just remember that field order matters massively here!
Sometimes you only need to fill certain fields. In that case, specify exactly which ones: INSERT INTO Instructor (InstructorID, Name) VALUES (5, 'D Thomas'); SQL dates follow the yyyy/mm/dd format, so '1985/11/30' means 30th November 1985.
Top Tip: Always double-check your field order when inserting data - getting this wrong is one of the most common SQL mistakes!
DELETE and UPDATE statements handle removing and changing existing data. DELETE works like: DELETE FROM Course WHERE CourseID = 'BMX05'; Be careful though - forget the WHERE clause and you'll delete everything! UPDATE follows this pattern: UPDATE Course SET Date = '2017/12/11' WHERE DATE = '2017/12/10';
EQUI joins connect related tables using matching key fields. This powerful technique lets you pull information from multiple tables simultaneously: SELECT Instructor.Name, Course.Title FROM Instructor, Course WHERE Course.InstructorID = Instructor.InstructorID;
We thought you’d never ask...
Similar content
Most popular content in Computer Science
9GCSE Computer Science Overview
Comprehensive study material for OCR GCSE Computer Science covering key topics such as computer architecture, network security, programming techniques, and ethical considerations. Ideal for exam preparation, this resource includes essential concepts, exam questions, and definitions to enhance understanding and retention.
A-Level Computer Science Paper 1 (Revision sheet)
(Apologies if some things look a bit off, converting the PowerPoint to PDF was a struggle as it wouldn’t let me include my custom drawings for diagrams)
GCSE Computer Science // Revision Notes
Concise revision notes for the GCSE OCR computer science specification (J277). Contains all the info needed for paper 1. Paper 2 is in my bio.
Python Basics for Year 8
Master the fundamentals of Python programming with this comprehensive guide tailored for Year 8 students. Explore key concepts such as variables, loops, conditional statements, and arithmetic operators. This resource includes practical examples and interactive coding exercises to enhance your understanding and prepare you for assessments.
Fundamentals of Computer Networking
Explore the essential concepts of computer networking, including types of networks (LAN, WAN, Internet), key components (nodes, links, protocols), and basic principles like IP and MAC addresses. This summary provides a comprehensive overview of network technologies and their significance in resource sharing, communication, and collaboration.
GCSE Computer Science Algorithms
Comprehensive overview of algorithms for AQA GCSE Computer Science Paper 1, covering key concepts such as sorting (Bubble Sort, Merge Sort), searching (Linear and Binary Search), and essential programming principles like data types, pseudocode, and flowcharts. Ideal for exam preparation and understanding algorithm efficiency.
CPU Architecture Essentials
Explore the fundamental components of CPU architecture, including the Fetch-Decode-Execute cycle, factors affecting CPU performance, and the role of embedded systems. This summary covers key concepts such as clock speed, cache size, and the Von Neumann architecture, providing a comprehensive overview for students studying computer systems.
GCSE Computer Science Revision
Comprehensive revision notes for OCR GCSE Computer Science Component 1 (J277). Covers key topics including networking, cybersecurity, data compression, computer architecture, and ethical issues. Ideal for exam preparation and understanding core concepts. Access original slides for further details.
Sorting Algorithms Overview
Explore key sorting algorithms including Bubble, Insertion, and Merge sort. This summary covers their definitions, advantages, disadvantages, and practical examples to aid your GCSE Computer Science exam preparation.
Most popular content
9Comprehensive Crime & Deviance Overview
Explore an extensive revision of crime and deviance topics, including theories, types of crime, and the impact of media. This resource covers key concepts such as Marxism, functionalism, gender and crime, and the influence of globalization on criminal behavior. Ideal for students seeking a thorough understanding of criminology and its various theories. Type: Full Topic Revision.
Criminology: Crime & Punishment Overview
Comprehensive mindmaps covering key concepts in the Crime and Punishment topic for WJEC Criminology Unit 4. This resource includes detailed insights into the Criminal Justice System, crime prevention strategies, sentencing models, and the roles of various agencies. Ideal for A-Level revision, ensuring you grasp essential theories and legislative processes to excel in your exams.
Sociology of Families: Comprehensive Revision
Dive into an extensive overview of family dynamics, perspectives, and patterns in sociology. This resource covers key concepts such as family diversity, gender roles, marriage, and the impact of social policies on family structures. Perfect for A-Level Sociology students preparing for Paper 2.
WJEC Unit 4 Criminology
Criminology unit 4 detailed revision note
Sociological Theories Overview
Comprehensive revision of key sociological theories including Functionalism, Marxism, Feminism, and Interpretivism. Explore concepts like value freedom, identity formation, and the critique of social control. Ideal for AQA A-Level Sociology students preparing for exams. This summary covers essential theories and their implications in sociology, providing a clear understanding of each perspective.
Sociology of Education Overview
Explore comprehensive A-Level Sociology notes on the education system, covering key theories, policies, and sociological perspectives. This resource includes insights on marketisation, gender roles, cultural deprivation, and educational inequalities, providing a thorough understanding of how education shapes social stratification and individual achievement. Ideal for exam preparation and in-depth study.
Media Studies: Key Concepts & Theories
Dive into the essential concepts and theories of media studies for AQA A-level Sociology. This comprehensive revision guide covers topics such as media influence, representations, globalization, and sociological perspectives, ensuring you grasp the critical elements needed for your exams. Perfect for students seeking to enhance their understanding of media's role in society.
Crime and Deviance AQA A-level sociology
AQA A-level crime and deviance topic notes
A-Level Biology Year 1 Overview
Comprehensive summary of AQA A-Level Biology Year 1, covering key topics such as cellular structure, protein synthesis, immune response, gas exchange, and more. Ideal for exam preparation and understanding biological concepts. Includes detailed insights into cellular processes, biological classification, and the circulatory system.
Students love us — and so will you.
The app is very easy to use and well designed. I have found everything I was looking for so far and have been able to learn a lot from the presentations! I will definitely use the app for a class assignment! And of course it also helps a lot as an inspiration.
This app is really great. There are so many study notes and help [...]. My problem subject is French, for example, and the app has so many options for help. Thanks to this app, I have improved my French. I would recommend it to anyone.
Wow, I am really amazed. I just tried the app because I've seen it advertised many times and was absolutely stunned. This app is THE HELP you want for school and above all, it offers so many things, such as workouts and fact sheets, which have been VERY helpful to me personally.