Now we are going to create one simple data in one simple table with the command create table salary.
We want to have three fields there employ number.
we are saying that type of that field is char three.
Then we are specifying it is the primary key.
Then we are specifying that department as a varchar type of 15.
character.
Then salary we are specifying salary of int six type, then we are going to close, it is going to create
the tables.
We can verify this.
by using that command show tables.
It will show us the table salary.
Then we are going to first enter one record into this, how to enter the record that mean
insert into salary values that when we are going to enter a values there, that the employee number
and what is the department, we are going to say, the marketing department then we are going to
enter the salary.
So let us first create the table and then put some data into there, then in next.
videos We further we are going to put a lot more data.
So let us first create a simple table.
So we have already connected to our mariadb server by using this aanya user.
So I will clear the screen.
So what we are going to do create table salary.
So bracket start.
Then we are going to specify the field, eno it is going to be of type char in your case so
you can create complex databases.
We wanted to keep the things simple.
So we are going to specify this as primary key.
And then comma, the second field is going to be department, it is going to be of varchar type and we are going
to specify that it will be of.
length 15.
Then we are going to specify the comma, then we have salary, how much salary the employee has got.
So we want it to be of.
six digit.
And we are going to close this.
Now, this table got created, so how we are going to view this table so we can run that command
show tables command it is showing you the salary table is there.
Now, what we are going to do, we are going to insert some data, insert into which table, salary
table values.
What are the values?
So we will enter the values.
101 is the employee number.
And department is.
Marketing.
then we are going to specify the salary, 30000, you can enter any
value you want.
That mean we are able to enter the one value into that, so our table creation is successful.