SELECT Statement
- 01:13
What is the SELECT Statement
Downloads
No associated resources to download.
Transcript
Select statement.
The select statement is used to select data from a database.
This particular statement is used to select the data from a specific column that we desire from from the database.
The return data is essentially stored in a result table called the result set.
But how do we write a select statement? There is a simple syntax rule that we need to follow because it's called the select statement.
It essentially starts with the select, and then we select the column, all columns that we require using a comma.
Then we need to also specify the table from which we need a data.
So we use the from statement for that, and we end the statement using the semicolon.
Once we run the query, this is going to return us to specified columns from the design table in the database.
In case we want to select all the columns from the database or from the table specifically, we use the star.
So for example, let's say we've got a share price dataset called Share price, and now we will require all the columns from the dataset.
So we say select star from share price, and we end it with a semicolon.
This would essentially give us the design data.