SQL WHERE allow us to select the data conditionally according to condition being set when write the command.

The SQL syntax will be:

SELECT [COLUMN NAME] FROM [TABLE NAME] WHERE [CONDITION]


EXAMPLE :

Let's say, we only want to retrieve data from GameScores Table to get person that Scores is more than 2000.

Table GameScores

PlayerNameDepartmentScores
JasonIT3000
IreneIT1500
JaneMarketing1000
DavidMarketing2500
PaulHR2000
JamesHR2000

SQL statement :

SELECT PlayerName FROM GameScores WHERE Scores > 2000

Result:

PlayerName
Jason
David