inner join in SQL and DBMS
Today, in this fresh and new article, we will cover the following topics;
- What is inner join?
- arial, helvetica, sans-serif; font-size: 12pt;”>Example of inner join
- Query of an inner join
Inner join shows results from both tables where there is any match between columns in both tables.
RegistrationNo | Marks |
T4Tutorials1 | 77 |
T4Tutorials2 | 32 |
T4Tutorials3 | 88 |
Table: Exams
Inner join shows results from both tables where there is any match between columns in both tables.
RegistrationNo | Fee |
T4Tutorials1 | 1000 |
T4Tutorials2 | 2000 |
T4Tutorials3 | 3000 |
Table: Accounts
Now, we have two different tables. If we want to show the record of both tables in one single table then we can use inner join to join both two tables.
Query of an inner join
SELECT Exams.RegistrationNo, Exams.Marks, Accounts.Fee FROM Exams INNER JOIN Accounts ON Exams.RegistrationNo =Â Accounts.RegistrationNo
RegistrationNo | Marks | Fee |
T4Tutorials1 | 77 | 1000 |
T4Tutorials2 | 32 | 2000 |
T4Tutorials3 | 88 | 3000 |
Table: Table generated after INNER Join
Test Your Understandings |
1.Inner join shows all rows from all tables ? YES / NO
Topic Covered
inner join in sql and DBMS