SQL Select Statement
In this tutorial, we will learn select statement, the select statement is used to retrieve data from a table .
select * from tutorials
you will retrieve following result.
| ID | Category | Author | Tutorial |
| 1 | PHP | Hassan | what is php |
| 2 | MySql | James | what is sql |
| 3 | Ajax | Andrew | what is ajax |
| 4 | ASP | James | ASP Introduction |
| 5 | C++ | Andrew | C++ Basics |
- select * is used to select all columns from database
- from indicates to tables
- after from we specify table
Notice: in this tutorial id, category, author, tutorial are columns every column has its own records
Now we will select specify columns
select category, author from tutorials
you will retrieve following result.
| Category | Author |
| PHP | Hassan |
| MySql | James |
| Ajax | Andrew |
| ASP | James |
| C++ | Andrew |
in this tutorial we have provided instructions to select satement only show data category, author columns.