Use the JOIN command to ask questions that involve more than one table.
- [Instructor] One advantage of working with databases,…rather than just spreadsheets,…is that it can be easier to use data…for more than one table.…Of course, you can work with data…across many spreadsheets using a lookup function,…and in a database, to accomplish the same thing,…we use the JOIN keyword.…There are a few kinds of JOINs, actually,…but we'll just look at one in this video.…The idea behind a JOIN is that we're asking…for pieces of data, or records,…that somehow associate with each other,…that connect in some way,…with some common piece of information…that we tell the database to match up…from one table to the next.…
In our sample database here,…the common element is the abbreviation for the state name.…In one table I have information about some people,…and in another table, called states,…I have some information about states in the U.S.…I have their name, their abbreviation,…and what census region and division they're part of.…We could perhaps use this information…to print up custom shirts for people…
- Name the predicate of the following statement: SELECT EyeColor, Age FROM Student WHERE FirstName = 'Tim' ORDER BY LastName ASC;
- Explain what to use to enforce the order in which an expression must be evaluated if the WHERE clause contains multiple expressions to evaluate.
- Identify the best option to join two tables in a database to be able to display data from both.
- List a data type that is not numeric.
- Determine the result of running the following statement on a table containing columns col_1 and col_2:
- INSERT INTO Box (col_1, col_2) VALUES ('A', 'B'), ('A', 'B'), ('A', 'B'), ('A', 'B');
- Determine the best approach of deleting Jon Ramirez (ID 3452) from a Student table.