Skip to content
Learnearn.uk » IB Computer Science » Database Manipulation Language Queries

Database Manipulation Language Queries

Intro

What is a Database Manipulation Langauge?

 

 

 

Select

SELECT

SELECT * FROM People

This is used to retrieve data from a database table(or multiple tables)

You can retrieve all columns from the tables, or restrict to specific rows

WHERE

This is used to filter results based on the criteria given

 

 

ORDER BY

This is used to sort the table by a certain column

 

 

GROUP BY

This is used to collate with certain shared values together

 

Aggregates

Aggregate Funtions (Sum, Count, average)

These queries are all used with the SELECT Query and all return number as the response to the query.

SUM

This sums up values within a certain column.

 

 

COUNT

The returns the number of rows retrieved by a statement

 

 

AVG

This returns the mean average of the attributes specified

 

 

Inner Join

INNER JOIN

This combines data from two tables (or more) into a single query.

 

 

 

Insert

INSERT

This adds a new row into a database table.

 

 

Update

UPDATE

The update  alters the data stored within a row or rows, depending on the parameters given.

 

Delete

DELETE

This query removes a row or rows, depending on the query. If you don’t specify what  data to delete then it will delete all data in a table

 

 

Practice