Hey guys Eddie the Magic Monk here. Last lesson we ran a query for creating a
table so if you didn't follow our instructions in the last lesson this is
basically what we did we created a table called students with integer primary key
student ID last name first name address phone number print balance and so on now
what I want you guys to do before we create another query is to save this
query because if you don't save it then it just goes away so just click ctrl s
to save and let's call it create student table query all right save it and now you
can close the query and on the left hand side if you go to queries you'll be able
to find the query to don't run it if you right click design view open it up again
and then you can run it again if you want but we've already created the table
so let's go back to just do all access objects and you'll be able to see
everything so now that we have a table if we open up the table we can insert
values by just typing things in here so for example I might create a student
called student ID 1 even though that's probably
going to be in the thousands if you have a big school last name just Smith first
name John address 230 Sonny Street bah-bah-bah phone number just a random
phone number sorry if that's really your number print balance 20.43 or
something doesn't matter ok so we've just inserted a tech record
into this table or a row into this table so now I'm going to take you through how
to use SQL to do that so let's create another query
so I've got to create query design close this show table window and go to SQL
view and now I'm going to show you how to do an insert query so let's put in
the SQL insert into students because that's the name of our table and let's
put in values okay so what values we want to insert the first one is an ID so
let's put ID is 2 - let's put in what else we got the last name is White first name
let's put in ah Daniel address ah 6 ah Indro road
I'm just making all this up and then what else do I have phone number is 0
alright just making things up and then print balance let's put in what do I
want to put in thirty point two four okay close it off and yeah you should be
able to actually let's put a semicolon here okay now if I run if I want to run
this go into the design tab click run and it should insert this row so click
run you're about to append one row click yes and you can see in the table you
might have to close it and open it up again
you got the new row inserted
so yeah that's the query for inserting records if you want you can go back to
this query and just put three and put someone else's name in so let's put Li
let's put Brian 7 something Mars Road zero nine blah blah blah ten okay I'll
run it again design run yes and you got another row now you will
only see the changes if you close the table and open it up again and you can
see we've added another student into our table so already we can see some
problems for example in the phone and the phone number field we got some
numbers that have the wrong digits we got the zero got stripped off so yeah
all these are things that we don't need so let's talk about how to fix that in
our next tutorial thanks for watching see you next time.