What is the use of Where Clause in SQL?

Where clause is used to filter out results according to our conditions. Using the WHERE clause, we can specify a selection criteria to select the required records from a table.

Syntax:

SELECT field1, field2,...fieldN table_name1, table_name2...
[WHERE condition1 [AND [OR]] condition2.....

The WHERE clause works like an if condition in any programming language. This clause is used to compare the given value with the field value available in a MySQL table.