DB section has been updated to add some SQL code.
INSERT statements are used to insert new data into a table.
An INSERT statement will have 2 or 3 main parts
Specify the table that the new record will be inserted into
Specify the fields you are inserting data for (optional)
List the values you are inserting
If you are inserting a value for every single field then we will just specify the table we are inserting into and the values that we are inserting.
A new instructor joins and his details need to be added. His ID is 5 and his name is D Thomas, he was born on the 1/5/86 and is a Grade 5.
INSERT Query Design
The order of fields have to be the same order they were created in.
If you are only inserting a value for some fields then we will also need to specify the fields that we are inserting values for.
The organisation is running a new BMX Advanced Course, its course ID is BMX05 and will be a BMX Advanced, it will run for 4 days and can take 10 people. It will be ran by Instructor R Hay ( ID 3) and will cost £400. They haven’t decided a date or price yet.
INSERT Query Design
This video will cover how to INSERT data into a table