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…
- 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.