May 2020
Beginner
564 pages
14h 9m
English
Note that in the preceding queries, we are referencing the database in front of the table name, like so:
lahmansbaseballdb.appearances
Another way you can set the database name is by using a USE statement instead. This means that you wouldn't have to prefix the table name with the database name, but instead have a USE statement that sets the database at the top of the query, as shown in the following query:
USE lahmansbaseballdb;SELECT playerid, g_all, g_batting, g_defense FROM appearances;
The preceding query will give you the same results as the following query:
SELECT playerid, g_all, g_batting, g_defense FROM lahmansbaseballdb.appearances;
The USE statement will set the database name for all subsequent queries, ...
Read now
Unlock full access