About This Chapter
Joins & Subqueries Using SQL - Chapter Summary
In this chapter, you'll find professionally designed lessons on subqueries and joins in SQL and how they're used. Move at your own pace as you review subjects such as inner joins, the functionality of complex queries, the definition of subqueries and much more. If you're unsure if you've understood what you've learned, answer the questions on the multiple-choice lesson quizzes or chapter test to make sure. Feel free to access this chapter at any time from any device with an internet connection. If you need assistance, one of our experts would be happy to answer any questions you post in the Dashboard. Once you complete these lessons, you should be ready to:
- Give examples of SQL complex queries
- Define the SQL join and give examples
- Outline SQL inner joins, full outer joins, cross joins and self-joins
- Differentiate between JOIN and UNION
- Provide the definition and examples of SQL subqueries
- Detail EXISTS, NOT EXISTS and WITH
- Use subqueries and joins in a practical application
1. SQL Complex Queries: Functionality & Examples
In this lesson, you'll learn some more advanced functions of SQL such as joins and stored procedures. These techniques are defined and working code examples are provided.
2. SQL Join: Definition & Examples
In this lesson, we will learn about an SQL Join of two or more tables and the importance of this type of operation, especially when it comes to Relational Databases.
3. SQL: Inner Joins
It is the most commonly-used way to merge data together in SQL. The Inner Join is used to select data from one or more tables for viewing or analysis. This lesson will describe the concept and provide syntax examples.
4. SQL: Full Outer Joins
The full outer join, or the full join, is the SQL syntax used to combine all the rows from two or more tables. With the full outer join, no rows will be left out of the resulting table from the query. This lesson provides examples and explanations for using a full outer join.
5. SQL: Cross Joins
Cross Joins are the SQL equivalent of a multiplication operation: They join tables together in such a way that ALL records are returned from each table.
6. SQL: Self-Joins
Joining a table to itself might sound contradictory. However, it is a useful and powerful tool in the SQL toolbox. We will cover the concept and provide examples of the power of a self-join.
7. SQL: UNION vs. JOIN
When you have to compare data from different tables, you have three choices. You can make a new table, or you can use either UNION or JOIN. This lesson shows you which of those two to use.
8. SQL Subqueries: Example & Definition
We live in a world of data: It's no longer uncommon to see databases that exceed ten million lines of information! Getting data out of large databases can be challenging. Enter the subquery. This lesson will define a method for filtering results to a manageable level and provide working examples.
9. SQL: EXISTS, NOT EXISTS & WITH
The SQL EXISTS and NOT EXISTS operators are used to test for the existence of records in a sub-query. The WITH clause, meanwhile, is an introduction in SQL 1999 mainly to support CTE (Common Table Expression) features. This lesson will outline the use of all three of these operators. A basic understanding of common SQL commands is required.
10. Practical Application for Introduction to SQL: Joins & Subqueries
In this practical lesson, you will combine data from different tables using joins and sub-queries. You will be able to write, execute, and test your code using MySQL.
Earning College Credit
Did you know… We have over 200 college courses that prepare you to earn credit by exam that is accepted by over 1,500 colleges and universities. You can test out of the first two years of college and save thousands off your degree. Anyone can earn credit-by-exam regardless of age or education level.
To learn more, visit our Earning Credit Page
Transferring credit to the school of your choice
Not sure what college you want to attend yet? Study.com has thousands of articles about every imaginable degree, area of study and career path that can help you find the school that's right for you.
Other chapters within the Analytics 103: Intro to Relational Databases & SQL course
- Introduction to General & Relational Databases
- Relational Database Management Systems
- Relational Database Design Fundamentals
- Introduction to SQL Syntax & Queries
- Database Table Design & SQL Data Types
- Using SQL to Populate & Retrieve Data
- Modifying Data in Databases With SQL
- Using SQL to Remove Data
- Using Views, Indexes & Triggers in SQL