bing
Flat 10% & upto 50% off + 10% Cashback + Free additional Courses. Hurry up
×
UPTO
50%
OFF!
Intellipaat
Intellipaat

What is Inner Join in SQL?

Inner Join is a keyword, which is used to select all rows from the participating tables as long as there is a match between columns.

Watch this Inner Join in SQL video

Inner Join in SQL

SQL Inner join basically gives records that have matching values in the participating tables. For example, let’s say, we have two tables, Table A and Table B. When inner join in SQL is applied on these two tables, it will get only those records which are common to both Table A and Table B

A Brief Introduction to Inner Join

 Syntax

SELECT columns
FROM table1 name
INNER JOIN table2 name
ON table1.coumn_x = table2.column_y;

where SELECT, INNER JOIN, and ON are the keywords, columns is the list of columns, table1 is the first table and table2 is the second table, and column_x and column_y are the columns for performing the inner join, followed by a semicolon.

Example

Let’s apply inner join to two tables, the employee table and the department table

Select employee.e_name, employee.e_dept, department.d_name, department.d_location from employee
INNER JOIN department
ON employee.e_dept = department.d_name;

A Brief Introduction to Inner Join 1

After writing the query, click on the execute button to check for errors. Once the query is executed, a message appears like ‘Commands completed successfully’.

This brings us to the end of this Inner Join in SQL tutorial section. Go ahead and link the tables from your database to get a better insight of your data.

Previous Next

Download Interview Questions asked by top MNCs in 2019?

"0 Responses on Inner Join in SQL - SQL Inner Joins"

    Leave a Message

    100% Secure Payments. All major credit & debit cards accepted Or Pay by Paypal.
    top

    Sales Offer

    Sign Up or Login to view the Free Inner Join in SQL - SQL Inner Joins.