In this lesson, we will see Select command in sql server.
The select command allows us to query the data in our table.

It is very simple to use. Let's explain right away.
First we write Select , then we write the name of the columns we want. If we want to select all the columns, we put the * sign.
Then we write From, and then we write our Table Name .

Example:  Select * from people  We said what we have done here, what is in the contact table or bring it to me And he brought us all the data in the rows and columns in the contacts table.

If I want to make conditional queries, I will use Where command.
As you know, where is English.
Let's do it immediately

Select * from contacts where tcno = 1

What we did here. We said go and bring the tcno 1 in the contacts table. He brought us the tc number 1 person.

   As you can see in the picture above, we did our operation. We called our people table, which we said select stars from people. Then we used the command "where" as our condition. And we got our result. That is all.
Good work to everyone.

Yorum Yap

Daha yeni Daha eski