May 2020
Beginner
564 pages
14h 9m
English
Column aliases allow you to assign a different name to a column in your query. You might be able to see that the columns haven't been named descriptively enough in the original table, or maybe you just want to name them differently in your query results. For example, the g_defense and H columns in the batting table may not be descriptive enough for you to understand what they mean in your results if you aren't familiar with baseball. We can make an alias for these column's names to make them more descriptive, as shown in the following query:
SELECT playerid, G_defense AS GamesPlayingDefenseFROM lahmansbaseballdb.appearances;
In the previous query, we added an alias to one of the columns, as shown in the ...
Read now
Unlock full access