DB section has been updated to add some SQL code.
 SQL Cheat Sheet.pdf
SQL Cheat Sheet.pdfStructured Query Language (SQL) is a language that is used to interrogate a database. All this means is that you use SQL to perform operations on the database.
If you have used programs such as Microsoft Access these can be known as a Relational Database Management System and they are simply a front end that generates SQL behind the scenes. In this book we will be using the SQL syntax from MySQL.
At National 5 you are expected you to be able to write and explain SQL commands to perform the following operations.
Query (Search) the database
Insert new information into a database
Update the information in a database
Delete existing information
Editing a database is when new details are added to the database or existing details are changed.
Searching a database simply involves finding a particular set of information from the database, for example everyone whose surname is Smith. It is possible that a search will return zero results.
Sorting a database is the act of organising the database into another order, for example in ascending alphabetical order by surname from A to Z or in descending order by age from oldest learner to the youngest learner.
 1 Sorting.mp4
1 Sorting.mp4Covers basic sorting of a table.
 2 SQL SELECT 1 TABLE.mp4
2 SQL SELECT 1 TABLE.mp4This video covers the user of SELECT statements to return data from a single table. For more info see below:
 3 SQL SELECT JOINS.mp4
3 SQL SELECT JOINS.mp4This covers how to use a SELECT statement when using more than one table. For more info see below:
 4 INSERT Statements.mp4
4 INSERT Statements.mp4This video will cover how to INSERT new rows into a table.
For more info see below:
 5 SQL UPDATE.mp4
5 SQL UPDATE.mp4This video will cover how to use an UPDATE statement to change existing rows within a table.
For more info see below:
 6 SQL DELETE.mp4
6 SQL DELETE.mp4This video will demonstrate how to use a DELETE query to remove rows from a table.
For more info see below: