Based on the 13/5/19 data 602 class.
Avoid loop function as it goes against the nature of structured code and repeats a certain area of code with out any while function to leave.
[] Means is optional so you only have to add it if you want to. This comes up in documentation to show that an value can be set for a certain part of the code making it easier to read the documentation.
… Means you can continue on with as much as you like. This comes up in places like with insert statement where we can import as may set of date as we want with a single statement.
We are leaning about MySQL statement and there syntax.
The difference between a function and a procedure is that a function returns a value and a procedure doesn’t.
As with procedure functions need DELIMITER.(*1)
Concat is the the thing which lets you add multiple bits of data next to each other. We will most likely need this to create some sort of variable in our project for example we might want to save a record of a we could fuse the name and the date of the game.
To get a function to produce an out put we need to use select statements.
SQL case functions only preforms one of the when conditions and not all of them this is useful as we will need a functionality like this for looking up usernames, since we will only have one of each username at any given time we will want the code to stop after it has found the username.
While is the better version of loop as it check for a condition, this prevents us from aimlessly running though functions and having to make a limits. This is useful to know because making code readable is an important part of programing and loops make code harder to read.
While loop check for condition at the start and repeat conditions repeat code if a condition at the end of a statement is true.
We will likely use IF statement to preform the log in function for a project.
Has to tell a function is Deterministic to show that the function will give a predictable return value.
(*1) MySQL :: MySQL 8.0 Reference Manual :: 13.6.5.2 IF Syntax, 13/05/2019, https://dev.mysql.com/doc/refman/8.0/en/if.html.