Right join in SQL, DBMS
Right join shows all rows from the right table and shows only matching rows from the left table.
Inner join shows results from both tables where there is any match between columns in both tables.
Now, we have two different tables. If we want to show the record of both tables in one single table then we can use right join to join both two tables.
Query of right join
SELECT Exams.RegistrationNo, Exams.Marks, Accounts.Fee FROM Exams RIGHT JOIN Accounts ON Exams.RegistrationNo = Accounts.RegistrationNo
In this query Accounts is the right table.
Table: Generated after Right Join
|Test Your Understandings|
1.Right join shows some rows from right table ? YES / NO
2. Right join shows all rows from left table? YES / NO
3. SELECT Exams.Marks, Accounts.Fee FROM Exams Right JOIN Accounts?
In this query, exams are the right table and accounts is the left the table.
Right join in SQL, DBMS.
- What Is AssignCode and How Can It Help With Java Assignment? - May 27, 2021
- How to write a resume for a job search: Tips for applicants - May 11, 2021
- The Best Tool to Test the Speed of Your Internet - May 5, 2021