80
Select Data
SELECT statement is used to retrieve records from single or multiple tables.
Syntax:
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
Example:
We have a table “Students”, having some data. So retrieve all records from “Students”.
Output:
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.
Example:
Output:
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.
Next TopicMariaDB Select Limit