A SELECT statement in SQL returns a result set of records from one of more tables.
Examples
Table 'T' |
Query |
Result |
|
Select * from T |
|
|
Select C1 from T |
|
|
Select * from T where C1=1 |
|
Given a table T, the query Select * from T
will result in all the elements of all the rows of the table being shown.
With the same table, the query Select C1 from T
will result in the elements from the column C1 of all the rows of the table being shown.
With the same table, the query Select * from T where C1=1
will result in all the elements of all the rows where the value of column C1 is '1' being shown.