May 2020
Beginner
564 pages
14h 9m
English
The WHERE clause is placed after the FROM clause in a SELECT query. Using the example of players with more than 40 appearances in games, you can execute the following query:
USE lahmansbaseballdb;SELECT playerid, g_all, g_batting, g_defense FROM appearancesWHERE g_all > 40;
The criterion we are setting in the WHERE clause (for example, g_all > 40) is called an expression. There are different expression operators you can use.
The following are the comparison operators:
| Symbol | Description | Examples |
| = | Equal to | column = 'text' column = 1 |
| >= | Greater than or equal to | column >= 1 |
| > | Greater than | column > 1 |
| <= | Less than or equal to | column <= 1 |
| < | Less than | column ... |
Read now
Unlock full access