SELECT statement is used to retrieve records from single or multiple tables.
The SELECT statement can be used with UNION statement, ORDER BY clause, LIMIT clause, WHERE clause, GROUP BY clause, HAVING clause etc.
Select All Columns from a Table
We have a table "Students", having some data. So retrieve all records from "Students".
Select Individual Columns from a Table
You can retrieve individual columns from a table by using SELECT statement. It facilitates you to retrieve only those columns which you need.
Here we select student_id, student_name, student_address from the table "Students" where student_id is less than 5 and we order the records in ascending order on the basis of student_id.