2.2.15

Structured Query Language

Test yourself on Structured Query Language

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

  • SQL is a language that can tell databases what to do.
  • SQL can be used for selecting, inserting, updating, and deleting data.
  • For GCSE you only need to know how to select (search for) data.
Select statements

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

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

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.
  • We can use the % symbol 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%";
Jump to other topics
1

Computer Systems

1.1

Systems Architecture

1.2

Memory & Storage

1.3

Computer Networks, Connections & Protocols

1.4

Network Security

1.5

Systems Software

1.6

Ethical, Legal, Cultural & Environmental Concern

2

Computational Thinking, Algorithms & Programming

2.1

Algorithms

2.2

Programming Fundamentals

2.3

Producing Robust Programs

2.4

Boolean Logic

2.5

Programming Languages & IDEs

Practice questions on Structured Query Language

Can you answer these? Test yourself with free interactive practice on Seneca — used by over 10 million students.

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
Answer all questions on Structured Query Language

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

Get started with Seneca Premium