SQL (OCR A-Level Computer Science): Flashcards
📚Flashcards
Practise the cards
15 cards from this deck
ShowHide
Practise the cards
15 cards from this deck
What does SQL stand for?
What does SQL stand for?
Structured Query Language
What is the purpose of SQL?
What is the purpose of SQL?
Managing and manipulating data in relational databases
What are the four main SQL command categories?
What are the four main SQL command categories?
DDL, DML, DQL, DCL
What is DDL (Data Definition Language) used for?
What is DDL (Data Definition Language) used for?
Define or modify database structure
What is DML (Data Manipulation Language) used for?
What is DML (Data Manipulation Language) used for?
Manipulate data within tables
What does CREATE TABLE do?
What does CREATE TABLE do?
Creates a table with specified columns & data types
What does INSERT INTO do?
What does INSERT INTO do?
Adds a new record to a table
What does SELECT do?
What does SELECT do?
Fetches records from a table
What does UPDATE do?
What does UPDATE do?
Updates existing records in a table
What does DELETE do?
What does DELETE do?
Deletes records from a table
What does ALTER TABLE do?
What does ALTER TABLE do?
Modifies table structure (add/delete/modify columns)
What does the WHERE clause do?
What does the WHERE clause do?
Retrieves specific rows by setting conditions
What does ORDER BY do?
What does ORDER BY do?
Orders results by one or more columns
What are five SQL aggregate functions?
What are five SQL aggregate functions?
COUNT, AVG, SUM, MAX, MIN
What does INNER JOIN do?
What does INNER JOIN do?
Shows data where there's a match in both tables
