A Guide to SQL
A Guide to SQL
9th Edition
ISBN: 9781111527273
Author: Philip J. Pratt
Publisher: Course Technology Ptr
bartleby

Concept explainers

Question
Book Icon
Chapter 5, Problem 15RQ
Program Plan Intro

Join:

The “JOIN ON” syntax is usually used to join two or more than two tables. This syntax usually works with “WHERE” clause. The keyword “JOIN” is normally placed between the table names in the SQL FROM clause. The keyword “ON” includes the matching key values.

Inner join:

  • Rows included in inner join: Inner join is the joining method that gets all rows with matching values in both the tables.
  • This does not include non-matching rows.
  • Clause used in inner join operation: Inner join operation uses “INNER JOIN” clause to join the tables.

Syntax:

SELECT column_Name(s) FROM table_Name1 INNER JOIN table_Name2 ON table_Name1.column_Name = table_Name2.column_Name;

Cartesian product:

  • It is the formal name for multiplying two tables.
  • It is also called as “CROSS JOIN” that returns the result that contains the product of number of rows in the first and second table.
  • If “WHERE” clause is used in “CROSS JOIN” then it works like “INNER JOIN”.

Syntax:

SELECT table_Name1.column_Name1, table_Name2.column_Name2… FROM table_Name1, table_Name2,…;

Blurred answer
Students have asked these similar questions
Can someone (using simple examples) tell me how to write an inner join, a left join, right join, and outer join? please use the 2 tables provided below for example.   Please go through each join step by step and do each seperatly
In your own words, describe the data that is returned by the 4 basic types of joins : inner join, left join, right join, full join.
it is possible to use a NATURAL join, there are some downsides to using this type of join. What are some of the downsides? Provide an example of a 3 table OUTER join (use JOIN ON in your SELECT statement syntax). Explain how it works and what the order of of the joins is.
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Text book image
A Guide to SQL
Computer Science
ISBN:9781111527273
Author:Philip J. Pratt
Publisher:Course Technology Ptr
Text book image
Oracle 12c: SQL
Computer Science
ISBN:9781305251038
Author:Joan Casteel
Publisher:Cengage Learning
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781285196145
Author:Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Publisher:Cengage Learning
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781305627482
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning