So here I have 2 tables and I need help understanding the basics of joins. I have developed some pieces of SQL code, but im not sure what they will output. I need to know what each one will output. INNER JOIN - SELECT StudentDetails.NAME, StudentMarks.MARKS FROM StudentDetails INNER JOIN StudentMarks ON StudentDetails.S_ID = StudentMarks.ID; LEFT JOIN - SELECT Name, Address, Age FROM StudentDetails LEFT JOIN StudentMarks ON S_ID=ID; RIGHT JOIN - SELECT Name, Address, Age FROM StudentDetails RIGHT JOIN StudentMarks ON S_ID=ID; FULL JOIN - SELECT StudentDetails.NAME, StudentMarks.MARKS FROM StudentDetails FULL OUTER JOIN StudentMarks ON StudentDetails.S_ID = StudentMarks.ID;
So here I have 2 tables and I need help understanding the basics of joins. I have developed some pieces of SQL code, but im not sure what they will output. I need to know what each one will output.
INNER JOIN - SELECT StudentDetails.NAME, StudentMarks.MARKS FROM StudentDetails INNER JOIN StudentMarks ON StudentDetails.S_ID = StudentMarks.ID;
LEFT JOIN - SELECT Name, Address, Age FROM StudentDetails LEFT JOIN StudentMarks ON S_ID=ID;
RIGHT JOIN - SELECT Name, Address, Age FROM StudentDetails RIGHT JOIN StudentMarks ON S_ID=ID;
FULL JOIN - SELECT StudentDetails.NAME, StudentMarks.MARKS FROM StudentDetails FULL OUTER JOIN StudentMarks ON StudentDetails.S_ID = StudentMarks.ID;
![ID
1
2
3
4
5
StudentMarks
NAME
Harsh
Suresh
Pratik
Dhanraj
Ram
MARKS
90
50
80
95
85
AGE
19
20
19
21
18](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F7daa69d8-205a-4b72-abf5-96966d755823%2F8d4d9385-c97a-4315-9f74-7fc9ce890bc1%2Ft5f8k7j_processed.png&w=3840&q=75)
![S ID
1
2
3
4
5
Student Details
NAME
Harsh
Ashish
Pratik
Dhanraj
Ram
ADDRESS
Kolkata
Durgapur
Delhi
Bihar
Rajasthan](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F7daa69d8-205a-4b72-abf5-96966d755823%2F8d4d9385-c97a-4315-9f74-7fc9ce890bc1%2Fzqzrxen_processed.png&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Trending now
This is a popular solution!
Step by step
Solved in 7 steps with 10 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)