Exercises, examples and other material relating to training module S152. This topic is presented on public courses Deploying LAMP - Linux, Apache, MySQL, Perl/PHP
, Linux Web Server
, Deploying Java Applications on Linux / Unix
The Structured Query Language provides the application programmer interface that allows data to be entered into, edited, and selected from most relational databases. It also provides users with suitable authorisation with the ability to create and edit the structures that hold the data.
Related technical and longer articlesMySQL joins - using left join and right join to find orphan rowsLeft Joins to link three or more tables
|Articles and tips on this subject||updated|
|4007||Which database should I use? MySQL v SQLite|
Which SQL Database would I advise newcomers with a new application to use?
Five years ago, MySQL would have been the obvious choice in many circumstances. But these days, MySQL has grown into a much bigger product and there are very serious licensing and other commercial issues that need to be considered; ...
|158||MySQL - LEFT JOIN and RIGHT JOIN, INNER JOIN and OUTER JOIN|
In a database such as MySQL, data is divided into a series of tables (the "why" is beyond what I'm writing today) which are then connected together in SELECT commands to generate the output required. I find when I'm running MySQL training, people often get confused between all the join flavours. Let ...
|3061||Databases - why data is split into separate tables, and how to join them|
If you're travelling from Chippenham to London by train, you may want to grab a quick coffee at the station before you set off - and where better than Steamers? And if you were traveling to Plymouth, Bristol, Southampton, Llandrindod Wells or Cheltenham, you would use Steamers too.
Let's assume I'm ...
|3060||INSERT, DELETE, REPLACE and UPDATE - changing the content of SQL tables|
Most enquires of an SQL database are SELECTs - most database are "Read Mostly" and writes are limited to a small proportion of accesses (though there are exceptions). And SELECTs are much more complex that things that insert or change data too.
However, I found myself writing en example on yesterday's ...
|2240||How do I query a database (MySQL)?|
From my mailbox ... "What are the different ways of queries in databases? Could u pls explain each way in more detail? thanks"
The term "query" means something a little bit different in the term "SQL" to it does in regular English usage - the dictionary definition is to ask for information / pose a ...
|515||MySQL - an FAQ|
We're becoming a serious MySQL resource, with many technical articles, examples, forum posts and blog entries answering those difficult-to-resolve issues you may have come across. You might like to bookmark (or link to) this page.
Eleven recent articles on MySQL ...
Flashbulb moments - facts that ...
|591||Key facts - SQL and MySQL|
Some quick ways to remember your SQL; here are some "flashbulb moments" for newcomers and occasional users of MySQL and other SQL databases.
A database daemon is a process that looks after a number of DATABASES each of which comprises a number of TABLES each of which comprises data arranges in ROWS ...
|270||NULL in MySQL|
NULL is not a value - it's a condition. So if you try and write something "= NULL" you'll get an empty set rather than the results you're looking for. Try "IS NULL" instead.
Joining 2 tables connecting records that match
mysql> select * from demo_people join demo_property on demo_people.pid ...
Examples from our training material
|joiner.sql|| Create two tables, link them with left join|
|linked.sql|| Two tables ... an illustration of the different joins|
|loader.sql|| Loading data from csv files|
|make_dvd.sql|| Create a database and table for a DVD collection|
|pop_dvd.sql|| Insert rows into sample dvd table |
|seeds.mysql|| MySQL example - table joins|
|sql_demo.sql|| Adding and amending data in a database table|
|tab1|| First table for advanced join demos |
|tab2|| Second table for advanced join demos |
Training for Oxford University Computer Services
You may download this module
as a sample of our material
Topics covered in this module
The structure of a database as seen by SQL.
Hello SQL World.
Initial administration and error handling.
Field types and modifiers in MySQL.
Floating point (real) numbers.
Whole (Integer) numbers.
One or more values from a pre-defined list.
Dates and Times.
A note on reserved words.
Commands to enter new rows of data.
The INSERT command.
The REPLACE command.
The LOAD command.
Returning table report information.
Commands to modify existing rows of data.
The UPDATE command.
The DELETE command.
Commands to modify the metadata.
The ALTER Command.
The DROP command.
The SHOW command.
On limiting selection.
Joining tables when selecting rows.
Extra use of SELECT.
Some more advanced SQL.
Loading data from file.
More on joining.
A regular "join".
A left join.
Joining across databases?.
If you are looking for a complete course and not just a information on a single subject, visit our Listing and schedule
Well House Consultants specialise in training courses in
. We run
throughout the UK (and beyond for longer courses), and
at our training centre in Melksham, Wiltshire, England.
It's surprisingly cost effective to come on our public courses -
even if you live in a different
country or continent to us
We have a technical library of over 700 books on the subjects on which we teach.
These books are available for reference at our training centre.