Docsity
Docsity

Prepara tus exámenes
Prepara tus exámenes

Prepara tus exámenes y mejora tus resultados gracias a la gran cantidad de recursos disponibles en Docsity


Consigue puntos base para descargar
Consigue puntos base para descargar

Gana puntos ayudando a otros estudiantes o consíguelos activando un Plan Premium


Orientación Universidad
Orientación Universidad


Joining Tables in SQL: INNER JOIN, LEFT JOIN, and RIGHT JOIN, Apuntes de Informática

The use and differences between three sql table joining commands: inner join, left join, and right join. Inner join is used to combine rows from two tables that have matching values in their common columns. Left join returns all records from the left table and the matching records from the right table. Right join returns all records from the right table and the matching records from the left table. Diagrams and references to w3schools for further learning.

Tipo: Apuntes

2021/2022

Subido el 22/06/2022

devy-salomon
devy-salomon 🇵🇪

5 documentos

1 / 2

Toggle sidebar

Esta página no es visible en la vista previa

¡No te pierdas las partes importantes!

bg1
INNER JOIN, LEFT JOIN, and RIGHT JOIN
In this opportunity we will define, compare and contrast the INNER JOIN, LEFT JOIN, and RIGHT JOIN
commands.
First we must understand the use of the INNER JOIN command, which is used to join 2 tables using a
common attribute. Graphically it would look like this:
The biggest advantage we find using this command is that thanks to the common attribute we will be
able to join all the values that both tables have in common (SQL INNER JOIN keyword, n.d.).
Secondly, we have the LEFT JOIN command, which works as follows:
Thanks to this graphic we understand that this command takes all the records from the left table while it
only takes those records within the left table that are also in the right table (SQL LEFT JOIN
keyword, n.d.). understanding this command, the RIGHT JOIN works in the same way only that in this
case it would take the right table first (SQL RIGHT JOIN keyword, n.d.):
Thirdly, among the differences we find in these commands is that only INNER JOIN takes values that are
in both tables, while the others are going to take certain values partially.
It should also be noted that there are commands that can modify the initial result, such as FULL JOIN
(SQL joins, n.d.).
pf2

Vista previa parcial del texto

¡Descarga Joining Tables in SQL: INNER JOIN, LEFT JOIN, and RIGHT JOIN y más Apuntes en PDF de Informática solo en Docsity!

INNER JOIN, LEFT JOIN, and RIGHT JOIN In this opportunity we will define, compare and contrast the INNER JOIN, LEFT JOIN, and RIGHT JOIN commands. First we must understand the use of the INNER JOIN command, which is used to join 2 tables using a common attribute. Graphically it would look like this: The biggest advantage we find using this command is that thanks to the common attribute we will be able to join all the values that both tables have in common ( SQL INNER JOIN keyword , n.d.). Secondly, we have the LEFT JOIN command, which works as follows: Thanks to this graphic we understand that this command takes all the records from the left table while it only takes those records within the left table that are also in the right table ( SQL LEFT JOIN keyword , n.d.). understanding this command, the RIGHT JOIN works in the same way only that in this case it would take the right table first ( SQL RIGHT JOIN keyword , n.d.): Thirdly, among the differences we find in these commands is that only INNER JOIN takes values that are in both tables, while the others are going to take certain values partially. It should also be noted that there are commands that can modify the initial result, such as FULL JOIN ( SQL joins , n.d.).

Bibliography SQL INNER JOIN keyword. (n.d.). W3schools.Com. Retrieved June 19, 2022, from https://www.w3schools.com/sql/sql_join_inner.asp SQL joins. (n.d.). W3schools.Com. Retrieved June 19, 2022, from https://www.w3schools.com/sql/sql_join.asp SQL LEFT JOIN keyword. (n.d.). W3schools.Com. Retrieved June 19, 2022, from https://www.w3schools.com/sql/sql_join_left.asp SQL RIGHT JOIN keyword. (n.d.). W3schools.Com. Retrieved June 19, 2022, from https://www.w3schools.com/sql/sql_join_right.asp