When asking questions that involve data from more than one table, there are a few ways of structuring the question. Explore the different kinds of JOIN commands to understand how your question should be phrased.
- [Instructor] When we use a join to associate data…across tables, there are a few ways we can go about it.…Let's think about our two tables…as being on the left and the right…in some kind of workspace.…Left and right in this sense are the table named first…in the select statement on the left and the table we're…joining to on the right.…If we just leave a statement…without any kind of qualifying parameters,…we get back a resulting table that's the size…of the left table times the right table.…We get back one of every row from the right table…for every row of the left table.…
This is called a cross join.…When we ask to join tables based on some given criteria,…that creates overlap between the tables…where the criteria match.…The state abbreviation CA for example on one table…would be equated to CA in the other table,…thereby joining those records together…and associating data from the right table…to data from the left table.…It's not a one to one relationship necessarily.…We could have one key on the right side…
- What is SQL?
- Asking for data with SELECT
- Limiting database responses
- Organizing responses
- Asking for data from two or more tables
- Understanding join types and data types
- Transforming data
- Performing math
- Adding and modifying data in a table