What is a Join in terms of database?

0 votes
Hi!!

Can someone tell me what exactly does a join mean in terms of databases?
Nov 13, 2018 in Database by darklord
• 6,170 points
59 views

1 answer to this question.

0 votes

JOINS are used to combine rows from two or more tables, based on a related column between those tables. The following are the types of joins: 

  • INNER JOIN: This join returns those records which have matching values in both the tables.
  • FULL JOIN: This join returns all those records which either have a match in the left or the right table.
  • LEFT JOIN: This join returns records from the left table, and also those records which satisfy the condition from the right table.
  • RIGHT JOIN: This join returns records from the right table, and also those records which satisfy the condition from the left table.

Refer to the image below.

Joins In SQL - MySQL Tutorial - Edureka

INNER JOIN

Syntax:

SELECT column_name(s)
FROM table1
INNER JOIN table2 ON table1.column_name = table2.column_name;

FULL JOIN

Syntax:

SELECT column_name(s)
FROM table1
FULL OUTER JOIN table2 ON table1.column_name = table2.column_name;

LEFT JOIN

Syntax:

SELECT column_name(s)
FROM table1
LEFT JOIN table2 ON table1.column_name = table2.column_name;

RIGHT JOIN

Syntax:

SELECT column_name(s)
FROM table1
RIGHT JOIN table2 ON table1.column_name = table2.column_name;
answered Nov 13, 2018 by DataKing99
• 8,130 points

Related Questions In Database

0 votes
1 answer

What do ‘Record’, ‘Field’ and ‘Table’ mean in terms of a database?

You can refer to the following definitions ...READ MORE

answered Nov 12, 2018 in Database by darklord
• 6,170 points
54 views
0 votes
1 answer

What is checkpoint in Database?

Checkpoint declares a point before which all ...READ MORE

answered Sep 4, 2018 in Database by darklord
• 6,170 points
219 views
0 votes
1 answer

What are the ways to get the count of records in a table

To count the number of records in ...READ MORE

answered Sep 26, 2018 in Database by darklord
• 6,170 points
96 views
0 votes
1 answer

What are the different types of keys used in the database?

There are mainly 5 types of Keys, ...READ MORE

answered Nov 19, 2018 in Database by darklord
• 6,170 points
108 views
0 votes
1 answer

How to color code cells of a column based on the text value in Tableau

You can use the following steps to ...READ MORE

answered Mar 27, 2018 in Tableau by Atul
• 10,240 points
2,240 views
0 votes
2 answers

Google Cloud datastore vs firebase

Google has already made a guide for ...READ MORE

answered Aug 20, 2018 in GCP by Priyaj
• 56,940 points
246 views
+1 vote
1 answer

Is it possible to store blockchain in a sql or no-sql database?

Currently, following are the options to store ...READ MORE

answered Apr 20, 2018 in Blockchain by Perry
• 17,020 points

edited Aug 9, 2018 by Omkar 69 views
+1 vote
1 answer
0 votes
1 answer

What is Normalization of database?

Normalization is the process of organizing data ...READ MORE

answered Oct 8, 2018 in Database by DataKing99
• 8,130 points
141 views
0 votes
1 answer

Is SELECT * harmful in Database?

There are really three major reasons: Inefficiency in ...READ MORE

answered Sep 7, 2018 in Database by DataKing99
• 8,130 points
52 views