SQL Select Statement

SELECT Statement is used to retrieve data/record from database. It also retrieve selected data with some conditions.

Syntax


SELECT expression
FROM table_name
WHERE condition;



Lets take table Student:
IDNameAgeDOB
1Rahul192000-07-25
2Karan251995-05-22
3Rocky231997-06-10
4Ajay201999-12-25


Retrieve all Data



SELECT * FROM Student;



Output


IDNameAgeDOB
1Rahul192000-07-25
2Karan251995-05-22
3Rocky231997-06-10
4Ajay201999-12-25


Retrieve Data with condition



SELECT * FROM Student WHERE `ID`='3';



Output


IDNameAgeDOB
3Rocky231997-06-10

Back To Top