Oracle: WHERE() Clause

The database itself means the collection of a vast amount of data. Also, the database can include even more than a thousand records. But sometimes, while working on the database, we need to retrieve limited data to perform certain operations.

For example, If the database has a table with employee details. Also, it carries the records of the same employee multiple times. So, In that case, we can filter the data in a datable to get the duplicate records using the WHERE() clause. So to conclude, we can say that the WHERE() clause in the database is to filter the data as per the condition required.

Syntax:

SELECT * from table_name

WHERE condition...;

Example:

we have the table stu shown below:

Stu
NameSectionRoll_NoSubject
RadhaB180Science
ShrutiB16Science
SnehaB17Science
AkshitaC1Commerce
BhoomikaC16Humanities

Check the details of Students with science as a Subject

SELECT * from Stu 
WHERE Subject='Science';

Output:

where