I will call you back again to another video lecture in PostgreSQL, and in this video lecture I'll walk
ahead and explain the basic syntax that is very important.
We must tie it because it's going to help us in implementing our queries.
And that is the select keyword.
All right.
So I've always used the select keyword.
And now if you have the knowledge of SQL this is not a problem because you have always known what it
is.
What if you are new in SQL or this is a very first time learning SQL?
You might be like I've always used select all from students and how do I select all the things.
So the keyword select which is this is used to select a colon.
You can be able to show a colon and some roads and all the roads.
Well if you go ahead and hit on exteriors, it means you want to select all the columns.
You want to display all the columns of variable in your table.
So select all means.
I want to display everything.
All right.
And you now select from that table.
You want to display that.
So the table is students.
And then you put accessories at the end of this.
So select all from students.
And if you hit enter it will go ahead and generate everything right in here.
All right.
So I'll go ahead and move this down down.
And we click enter.
It's keep moving down and down.
Now let me why had I use this.
Because this might be more easier.
But whatever you do here is still going to be done in any of them.
You know the skew ratio or the pgadmin.
So if I query this using select all, I have all these.
So I think this is much easier for me.
Now I can be able to select maybe the first name, the last name email or gender.
So if I want to do that I'll go ahead and say select.
I will remove the categories and I'm going to give a specific detail a column I want.
Maybe I'm going to say select first underscore name.
And this is going to display only the first name.
Go ahead.
And that is the query.
And you can see I have select first name from students.
And I have the first name displayed.
And I can move this down to 1000.
All right so I can add more of these I can say select column.
And what I need to do is to go ahead and put a comma.
And I'm going to say last underscore name.
And I want to execute this query.
And I'm going to see first name and last name.
Last name.
How about is cool.
So I can also go ahead and uh add maybe I want to select uh maybe the email.
This is going to be sequential.
So if I go over here and I have email gender insert date.
So I can also say maybe I want to select the enroll date in rule underscore date.
And let's go ahead and check it out.
So I have this right in here.
So you can see how this select keyword works I can also go ahead and remove everything and say I want
to select just the email.
So I'll select email from students and then a warhead and a hit on this and have the email selected
for me.
So this is what the select keyword actually does for us.
You can use the select keyword to select either all the columns or some of the columns and so on.
So it's a very important aspect in SQL queries and how you're always going to use that to query your
table and be able to display results.
So it's very important we know this before we move on because we're going to use these.
And why I introduced these in this video lecture is because I have imported a large data set.
And I need to explain this basic syntax so it can be good to master it and move on in this course.
So check it out, practice with it.
If you have any questions, go ahead and use the question and answer section.
And I'm going to get back to you as soon as possible.
Thank you so much.
And I'm going to see you in the next video lecture.