Please note, this is a STATIC archive of website www.javatpoint.com from 19 Jul 2022, cach3.com does not collect or store any user information, there is no "phishing" involved.
Javatpoint Logo
Javatpoint Logo

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:

Mariadb Select data 1

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:

Mariadb Select data 2

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.







Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA