3.2.7
SQL
Test your knowledge with free interactive questions on Seneca — used by over 10 million students.
Structured Query Language
A database is a structured collection of data. Structured query language (SQL) is a language used to query this data.

SQL
- SQL is a language that can tell databases what to do.
- SQL can be used for selecting, inserting, updating, and deleting data.

Select statements
- A SELECT statement searches for and returns data. E.g:
- SELECT * FROM table_name;
- The * character tells the database to return all fields.
- The * character can be replaced by specific fields. E.g:
- SELECT name FROM users;

Where clause
- Sometimes we don't want to return data for all records.
- We can filter the data using a where clause as follows:
- SELECT * FROM users WHERE ID=3;
- The above line would only return a user's data where they have an ID of 3.

Wildcards
- Sometimes we don't know the exact value we want to use in a where clause.
- We can use wildcards to find records which match some sort of pattern.
- The % symbol can be used to represent anything.
- For example, if we want to find any names starting with 'Ba' then we could query:
- SELECT name FROM users WHERE name LIKE "Ba%";
1Components of a Computer
1.1Structure & Function of the Processor
1.2Types of Processors
1.3Input, Output & Storage
1.3.1Elements of Computer Systems1.3.2Types of Computer Systems1.3.3How Magnetic Storage Works1.3.4Properties of Magnetic Storage1.3.5Examples of Magnetic Storage1.3.6How Optical Storage Works1.3.7Properties of Optical Storage1.3.8Examples of Optical Storage1.3.9Types of Optical Disc1.3.10Random Access Memory1.3.11Read Only Memory1.3.12Uses of Flash Memory1.3.13Properties of Flash Memory1.3.14What to do When We Run Out of Memory1.3.15How Virtual Memory Works
2Software & Software Development
2.1Systems Software
2.2Applications Generation
2.2.1Applications Software2.2.2Utilities2.2.3Encryption Software2.2.4Defragmentation Software2.2.5Data Compression Software2.2.6Backup Software2.2.7Open Source Software2.2.8Proprietary Software2.2.9Licensing Issues2.2.10Compilers2.2.11Interpreters2.2.12Assemblers2.2.13Compiling a Program2.2.14Lexical Analysis2.2.15Compilation Stages2.2.16Linkers, Loaders & Libraries
2.3Software Development
2.3.1Algorithmic Thinking2.3.2Waterfall Lifecycle2.3.3Waterfall Lifecycle - Strengths & Weaknesses2.3.4Agile Methodology2.3.5Agile Methodology - Strengths & Weaknesses2.3.6Extreme Programming2.3.7Extreme Programming - Strengths & Weaknesses2.3.8Spiral Methodology2.3.9Spiral Methodology - Strengths & Weaknesses2.3.10Rapid Application Development2.3.11RAD - Strengths & Weaknesse
2.4Types of Programming Language
3Exchanging Data
3.1Compression, Encryption & Hashing
3.2Databases
3.3Networks
3.3.1The Benefits of Networks3.3.2Network Performance3.3.3Types of Networks3.3.4Network Protocols3.3.5Transmission Protocols3.3.6What is the Internet?3.3.7Uniform Resource Locators3.3.8Domain Name Service3.3.9Web Hosting3.3.10Layering Concepts3.3.11TCP &. OSI Models3.3.12The Advantages of Layering3.3.13What's in a Packet?3.3.14How do Packets get Routed?3.3.15Did my Data Arrive Safely?3.3.16Network Hardware3.3.17Transmission Media3.3.18Firewalls3.3.19Proxies3.3.20Client-Server Model3.3.21Advantages of the Client Server Model3.3.22Disadvantages of the Client Server Model3.3.23Peer-to-Peer Model3.3.24Advantages of the Peer-to-Peer Model3.3.25Disadvantages of the Peer-to-Peer Model
4Data Types, Data Structures & Algorithms
4.1Data Types
4.1.1Data Types4.1.2Casting4.1.3Arrays4.1.42D Arrays4.1.5Strings4.1.6Binary4.1.7Sign & Magnitude4.1.8Binary Addition4.1.9Binary Shifts4.1.10Hexadecimal4.1.11Using Hexadecimal4.1.12Converting Binary & Hexadecimal4.1.13Converting Denary & Hexadecimal4.1.14Floating Points in Binary4.1.15Normalisation of Floating Points4.1.16Floating Point Addition4.1.17Floating Point Subtraction4.1.18Bitwise Manipulation - Shifts4.1.19Bitwise Manipulation - Masks4.1.20Character Sets4.1.21ASCII4.1.22Unicode
4.2Data Structures
5Legal, Moral, Cultural & Ethical Issues
5.1Computing Related Legislation
5.2Moral & Ethical Issues
5.2.1Online Activity Tracking5.2.2Censorship5.2.3Positive Cultural Impacts5.2.4Negative Cultural Impacts5.2.5E-Waste5.2.6Energy Consumption5.2.7Positive Environmental Impact5.2.8Layout, Colour Paradigms & Character Sets5.2.9Computers in the Workplace5.2.10Automated Decision-Making5.2.11Artificial Intelligence5.2.12Monitoring Behaviour5.2.13Analysing Personal Information5.2.14Piracy & Offensive Communication
6Elements of Computational Thinking
6.1Thinking Abstractly
6.2Thinking Ahead
6.3Thinking Procedurally
6.4Thinking Logically
6.5Thinking Concurrently
7Problem Solving & Programming
7.1Programming Techniques
7.2Programming Construction
Jump to other topics
1Components of a Computer
1.1Structure & Function of the Processor
1.2Types of Processors
1.3Input, Output & Storage
1.3.1Elements of Computer Systems1.3.2Types of Computer Systems1.3.3How Magnetic Storage Works1.3.4Properties of Magnetic Storage1.3.5Examples of Magnetic Storage1.3.6How Optical Storage Works1.3.7Properties of Optical Storage1.3.8Examples of Optical Storage1.3.9Types of Optical Disc1.3.10Random Access Memory1.3.11Read Only Memory1.3.12Uses of Flash Memory1.3.13Properties of Flash Memory1.3.14What to do When We Run Out of Memory1.3.15How Virtual Memory Works
2Software & Software Development
2.1Systems Software
2.2Applications Generation
2.2.1Applications Software2.2.2Utilities2.2.3Encryption Software2.2.4Defragmentation Software2.2.5Data Compression Software2.2.6Backup Software2.2.7Open Source Software2.2.8Proprietary Software2.2.9Licensing Issues2.2.10Compilers2.2.11Interpreters2.2.12Assemblers2.2.13Compiling a Program2.2.14Lexical Analysis2.2.15Compilation Stages2.2.16Linkers, Loaders & Libraries
2.3Software Development
2.3.1Algorithmic Thinking2.3.2Waterfall Lifecycle2.3.3Waterfall Lifecycle - Strengths & Weaknesses2.3.4Agile Methodology2.3.5Agile Methodology - Strengths & Weaknesses2.3.6Extreme Programming2.3.7Extreme Programming - Strengths & Weaknesses2.3.8Spiral Methodology2.3.9Spiral Methodology - Strengths & Weaknesses2.3.10Rapid Application Development2.3.11RAD - Strengths & Weaknesse
2.4Types of Programming Language
3Exchanging Data
3.1Compression, Encryption & Hashing
3.2Databases
3.3Networks
3.3.1The Benefits of Networks3.3.2Network Performance3.3.3Types of Networks3.3.4Network Protocols3.3.5Transmission Protocols3.3.6What is the Internet?3.3.7Uniform Resource Locators3.3.8Domain Name Service3.3.9Web Hosting3.3.10Layering Concepts3.3.11TCP &. OSI Models3.3.12The Advantages of Layering3.3.13What's in a Packet?3.3.14How do Packets get Routed?3.3.15Did my Data Arrive Safely?3.3.16Network Hardware3.3.17Transmission Media3.3.18Firewalls3.3.19Proxies3.3.20Client-Server Model3.3.21Advantages of the Client Server Model3.3.22Disadvantages of the Client Server Model3.3.23Peer-to-Peer Model3.3.24Advantages of the Peer-to-Peer Model3.3.25Disadvantages of the Peer-to-Peer Model
4Data Types, Data Structures & Algorithms
4.1Data Types
4.1.1Data Types4.1.2Casting4.1.3Arrays4.1.42D Arrays4.1.5Strings4.1.6Binary4.1.7Sign & Magnitude4.1.8Binary Addition4.1.9Binary Shifts4.1.10Hexadecimal4.1.11Using Hexadecimal4.1.12Converting Binary & Hexadecimal4.1.13Converting Denary & Hexadecimal4.1.14Floating Points in Binary4.1.15Normalisation of Floating Points4.1.16Floating Point Addition4.1.17Floating Point Subtraction4.1.18Bitwise Manipulation - Shifts4.1.19Bitwise Manipulation - Masks4.1.20Character Sets4.1.21ASCII4.1.22Unicode
4.2Data Structures
5Legal, Moral, Cultural & Ethical Issues
5.1Computing Related Legislation
5.2Moral & Ethical Issues
5.2.1Online Activity Tracking5.2.2Censorship5.2.3Positive Cultural Impacts5.2.4Negative Cultural Impacts5.2.5E-Waste5.2.6Energy Consumption5.2.7Positive Environmental Impact5.2.8Layout, Colour Paradigms & Character Sets5.2.9Computers in the Workplace5.2.10Automated Decision-Making5.2.11Artificial Intelligence5.2.12Monitoring Behaviour5.2.13Analysing Personal Information5.2.14Piracy & Offensive Communication
6Elements of Computational Thinking
6.1Thinking Abstractly
6.2Thinking Ahead
6.3Thinking Procedurally
6.4Thinking Logically
6.5Thinking Concurrently
7Problem Solving & Programming
7.1Programming Techniques
7.2Programming Construction
Practice questions on SQL
Can you answer these? Test yourself with free interactive practice on Seneca — used by over 10 million students.
- 1What does the * wildcard mean in SQL?Multiple choice
Unlock your full potential with Seneca Premium
Unlimited access to 10,000+ open-ended exam questions
Mini-mock exams based on your study history
Unlock 800+ premium courses & e-books