May 2020
Beginner
564 pages
14h 9m
English
There a few ways you can use the % wildcard, which represents zero or more characters. You can use it to find a value at the beginning, end, or middle of a string. For example, the following query will find all player IDs that start with the letter a:
USE lahmansbaseballdb;SELECT playerid, g_all, g_batting, g_defense FROM appearancesWHERE playerid LIKE 'a%';
The previous query will return the rows shown in the following screenshot:

If you move the % sign in front of the letter a, you are filtering on anything that ends in a. In this case, it will find no rows since playerid always ends in a number:
USE lahmansbaseballdb; ...
Read now
Unlock full access