Where

SQL WHERE

The WHERE condition is used to return the records that fulfill the conditions immediately after the keyword.

Syntax

SELECT * FROM name_of_table WHERE condition;

Example

Table of books

ID NAME PRICE
1 Learn Python 45
2 MySQL Tutorial 32
3 PHP examples 24
4 Learn SQL 32
SELECT * FROM books WHERE price=32;

Output

ID NAME PRICE
2 MySQL Tutorial 32
4 Learn SQL 32