Hello and welcome to this feature you're on.
ESKEW sir at the rescue will insert command is used to add data in to a table.
We created a table earlier in our previous couple of videos.
Now we are going to populate that table using the excuse insert command.
I have got to add for our record editor open hand we are going to use the school insert command to add
some records in to the table we created earlier.
So let's see what columns are in the table at the moment.
So the table name we created was destinations so we do select
darkstar means bring back everything from
Right so select means bring back star means everything from the location of the table and destination
is the name of the table and then put it end with our semicolon and run that so we know that we.
This table is currently empty is got three columns.
Destination city and country.
So we going to use the square insert command to add some records in to the table so to do that you start
the command with insert to do insert into
your insert in in two.
You got to specify the name of the table.
The table is destination
and then the next line you specify the values.
So we know that the table has got three columns.
Destination idea city and country.
So that's what the values mean.
So to specify the values you put them into inside parentheses the last one and then enclosing one as
well.
In between the parentheses is where you specify your values.
All right so the first one is a destination idea.
So are we going to use a sequence for this one so that the numbering is automatic.
Remember in the previous video we created a sequence for this table saw this sequence.
We need to use that now so the name of the sequence is destination.
Underscore Yes.
Q Does the name of this sequence and when you do next.
You do a dot then next
Nagas Val neg's far means no age should be the next available numbering in this case because we've not
used did before.
So I expect this idea here to have a number of one.
So we'll pull a common cause we have now given a value to this one here.
Vi the why sequence so the sequence is going to create numbering here.
Next we need to specify this CTE.
So our specifier let's see New York.
You always have to surround your text in quotes pinned on a string so you need to so out surround the
strings in quotes.
So the first New York City New York.
And then a comma.
The final call on this country be you see.
Who do you saying.
All right so I've got my three three columns now populated destination.
They will be populated by the sequence.
The city is New York country USC and then end that with a semicolon.
It's always important to end your state.
No semicolon.
So if I run that now I should have a new record inserted so I go run.
We did and like that for something Okay let's see what's gone on here in invalid statement.
Let's have a look.
Okay let's.
Some space there that again because I left the gap.
You see that is now done one row.
Insert it one row insert is inserted record.
So be careful with your spaces when you are adding values because the editor might complain as you just
did with mine.
So let's check that out.
So if we run this query on the top here we should have some data in there now.
So to run say that the numbering is 1 courtesy of the sequence in New York country you see excellence
or we've now inserted.
Eric hold him to a table using the insert command to use in practice and just insert a few more.
I'll just insert a few more.
I will see changes to London
and change that to you.
Key and there run that C inserted on another roll.
So if I run this I should have two records now and go round C and got two records numbering is in order.
Was done that and it took comit always commager work.
Once you are done because once you execute the data would be in there but it will not be permanent so
you need to Committed to be permanent.
Once you've executed all your query you can sue rawabi if you are not happy but once you commit it that's
it.
You can roll back.
So are now committed the values into the database.
So practice some more insert in some more rows into this table saw.
In this video we learned how to use the escudo insert command to insert new records into a table.
I hope we've had you as being useful.
Thank you so much for your time as always you take care.
Bye for now.