Hello and welcome to this vigil on creating a sequence sequence is there an automatic rule numbering
system that can help improve the performance.
True kashin.
So we are going to create a sequence.
So I've got to add for a quote edit orpen will be created in our sequence in here the sequence will
be helpful later when we try to populate the table we created so we will come in handy soon to create
a sequence.
You begin by typing in the word create sequence.
Followed by these schema.
And the name of the sequence.
It is always good practice to name your sequence as close as possible to the table you're trying to
apply the sequence to.
So in this case one this requires two relate to the destination table.
So our IT destination
on the score is the queue.
So that's the name of the sequence and the sequence takes some values he needs to tell the sequence
what number to start with.
You do that with a start and give it a value giving the value of one.
I wanted to start with one.
Next you need to set minimum value.
You do that with the main vowel mean.
I'll said that to one.
Next you need to set a maximum value
and you can make this several nines just 9 9 and lined up all as many as possible your keyboard.
Next we need to set an increment increment by.
So how do we want the numbering to increase.
So we do that with increment
by.
I want it to increase by 1.
So you specify that need to specify it.
Cash.
Cash well.
CASH dollars.
That is cash like a storage mechanism so you can specify how many numbers how many numbers the account
can hold at a time so it makes it easy to retrieve.
If you have certain numbers in cash there is a disadvantage to this as well.
In that if you have a power cut you lose all or the number or the or the date or the numbering you've
got inside the cash.
On the positive side if you have numbers cashed it makes it easy to retrieve.
And this will improve the performance.
But on the flipside if you got a power cord you lose what you've stored so and then set the cash to
Tier 1 it is just stored 30 and then up end that with a semicolon semicolon.
Always terminate your statements rights allow that the sequence has been created.
I need to execute this call execute.
You see there is a sequence created sequence created.
Once you've executed you also have to commit.
Once you commit you can't roll back.
At this stage I can decide I don't want no sequence so go ahead.
Just roll it back using the roll back command on the editor saw was some sure.
I want this to stay in the database.
I have it.
Comet it's now being it.
It tells you the comet executer blah blah blah.
All right so we now have a sequence.
So your we went through creating a sequence.
Sequences are good for automatic number 3.
Thank you so much for watching.
I hope this feed your has been helpful.
Hope to see you again soon.
You have a good day.
Bye for now.