SQL - WHERE CLAUSE

The WHERE clause is used to filter records based on specific condition.

SYNTAX

59.png

Where,

  • SELECT                                            : keyword used to fetch records in a table.

  • Table_name                                     : The name of the table from where you want to fetch the data

  • Column1Name, Column2Name        : The name of the columns of the table which you want to uniquely fetch.

  • Where                                              : specific condition based on which you want to filter your records.

EXAMPLE

Let’s query the PersonalInfo Table and look for a specific condition in where clause

60.png
61.png
 

Figure 19.1 Select * from PersonalInfo;

 

Figure 19.2. Select * from PersonalInfo where condition;

PRACTICE YOURSELF 

62.png