What is the INSERT command? What does it do? Let's explain this first.
The INSERT command is the command we use to add new records to the table we create in the sql server. It is a command that we use to add data to the database we create not only in SQL server but also in Php language.
It is very simple to use : We use it with the INTO command.
Then we write the TABLE name you want to register .
After that, we open parentheses and write the column names of the table .
For example. (tcno, name, surname, province). You will now see whatever name is in the table you created.
Values ​​(VALUE)  We write and write the values ​​corresponding to our columns. And our process is over.
Let's show with examples.
Our code is as follows:
(tcno, name, surname, province)

Let's look at what we have done here.
As you can see in the picture, we said insert into people. So add it to your contacts table. So how will he add it to the contacts table? tc, name, surname and columns will be found first in the people table. After finding it, he will add the values ​​of 33, 'Yasin', 'Küçük' and 'Mersin', which we mentioned with Values ​​to these girths.

   As you can see, the values ​​we have specified have been successfully added to the colons we have specified  .

It is that easy to add data to our database with the insert into command.
After learning the basics of the queries, we will learn to use these queries in c # and php in our next lessons. It is not difficult to use both languages, they all have the same logic. There is no difficulty.

This lesson is a success for everyone.

Yorum Yap

Daha yeni Daha eski