TestingDocs.com
Software Testing website
  • Automation
    • Selenium
    • JBehave Framework
  • Tutorials
    • MySQL Tutorials
    • Testlink
    • Maven
    • Git
  • IDEs
    • IntelliJ IDEA
    • Eclipse
  • Flowcharts
    • Flowgorithm
    • Raptor
  • About

MySQL

MySQL Joins

Overview

In this tutorial, we will learn MySQL Joins. We can combine data from multiple tables, using the MySQL JOIN keyword. A join operation produces result by combining or joining information in one table with information in another table.

The main categories of joins are as follows:

  • Cross Join
  • Inner Join
  • Outer Join

Syntax

The basic join syntax is shown below:

SELECT table1.column, table2.column, ..
FROM table1 JOIN table2
ON (table1.common_column=table2.common_column)
WHERE <conditions>

Cross Join

Cross Join is also called a Cartesian Product. Cross Join yields all possible combinations of rows. The Cross Join combines all the rows from one table with all the rows of another table

When the tables are cross-joined, each row from one table is combined with each row from every other participating table.

For example, if Table A has 5 rows and Table B has 10 rows. The Cartesian Product of the two tables will yield

= 5 * 10 = 50 rows

INNER JOIN

An INNER JOIN identifies matching rows from the joined tables.

https://www.testingdocs.com/mysql-inner-join/

OUTER JOIN

An INNER JOIN finds matching rows from the joined tables. OUTER JOIN will also finds instances of rows in one table that has no match in another table in the join.

https://www.testingdocs.com/mysql-outer-join/

 

—

MySQL Tutorials

MySQL Tutorials on this website:

https://www.testingdocs.com/mysql-tutorials-for-beginners/

For more information on MySQL Database:

https://www.mysql.com/

Related Posts

MySQL Workbench Windows 11

MySQL /

New MySQL Connection in Workbench

MySQL Command-line Client

MySQL /

Command-Line MySQL Client

Start MySQL Client

MySQL /

Start MySQL Client on Windows 11

Windows 11 Services Run Prompt

MySQL /

Start MySQL Server on Windows 11

MySQL Community Downloads TDocs

MySQL /

Download & Install MySQL on Windows 11

‹ MySQL Aggregate Functions› Working with MySQL Command Line

Recent Posts

  • Install RAPTOR Avalonia on CentOS
  • Download RAPTOR Avalonia Edition on Windows
  • npm doctor command
  • Print Triangle Pattern Flowchart
  • RAPTOR Editions
  • Flowgorithm Conditional Breakpoint Statement
  • Flowgorithm Read Numbers from File Example
  • Search Text File Flowchart Example
  • Flowgorithm Turtle Graphics Symbols
  • Draw Circle using Flowgorithm Turtle

Back to Top

Links

  • Contact
  • Privacy Policy
  • Cookie Policy

www.TestingDocs.com

Go to mobile version