All right.
So if all you care about is the solution.
Just check out the code.
Following this lecture or post the video you can see the solution here.
But I'll go ahead and go through the process of typing this out very quickly.
I'll kind of speed it up.
So what I'd like to do is start by defining the rough skeleton of what we need in a sequel file.
So we need a create table employees and then within that we'll have Id have first name last name of
middle name and then we have age and current status just like that.
And then we can fill in the data types.
So we know ID is an integer and age is an integer then these are our chars for our cars.
Let's say 2 5 5.
So somebody may have a giant name and same for current status.
So then the next thing that we could do is focus on an idea which we know needs to autoincrement And
we also want it to be mandatory and a primary key.
So mandatory means not know.
And the primary key there's actually two options.
The first one is to do this and the second one just duplicate this.
It's also in the slides is to add it on the end here.
We don't want that underscore that.
There we go.
So these will do the same thing.
But of course we're not done.
So the next thing would be first name and first name it's just mandatory as is last name.
So we'll just add not no and not no middle name.
We can leave alone and we've got age which is also mandatory.
And then finally current status which is mandatory but there's also a default value.
So we want nominal defaults employed and then we need to make sure we have all the correct Comus here.
Just like that at our semi-colon aswell.
Copy it.
Let's see what happens.
All right.
So looks good we can describe employees and then if we wanted to let's just do a single test insert
to make sure our default value works in our autoincrement works.
So what do you insert into employees and we'll do it first name a last name com age and that's it.
Because everything else either has and is allowed to be know or has a default value and will insert
someone with the name of Dora Smith.
Yes.
And let's say she is fifty eight.
OK.
Copy that set in.
Let's do a select star from employees just like that and it looks good.
We've got an I.D. auto incrementing at one first name last name.
Middle name is No.
Because it's allowed to be age of 58 and current status is employed because we didn't specify one.
And we have a default value.
All right.
So again the other solution here is just to put primary key on the same line when you're defining the
column.
I prefer to do it that way.
But you also see it done this way both work.
All right.
That's it.