18 Lecture
CS403
Midterm & Final Term Short Notes
Types of Joins
In database management systems, a join operation combines rows from two or more tables based on a related column between them. The most common types of joins are inner join, left join, right join, and full outer join. Inner join returns only the
Important Mcq's
Midterm & Finalterm Prepration
Past papers included
Download PDF
Which type of join returns only the matched rows? A) Inner join B) Left join C) Right join D) Full outer join Answer: A) Inner join Which type of join returns all the rows from the left table and matched rows from the right table? A) Inner join B) Left join C) Right join D) Full outer join Answer: B) Left join Which type of join returns all the rows from the right table and matched rows from the left table? A) Inner join B) Left join C) Right join D) Full outer join Answer: C) Right join Which type of join returns all the rows from both tables, matching where possible and returning null values where there are no matches? A) Inner join B) Left join C) Right join D) Full outer join Answer: D) Full outer join Which type of join is equivalent to the intersection of two sets? A) Inner join B) Left join C) Right join D) Full outer join Answer: A) Inner join Which type of join is equivalent to the union of two sets? A) Inner join B) Left join C) Right join D) Full outer join Answer: D) Full outer join Which type of join is used to find rows with no matching data in the joined tables? A) Inner join B) Left join C) Right join D) Full outer join Answer: B) Left join Which type of join is used to find rows with missing data in one of the tables? A) Inner join B) Left join C) Right join D) Full outer join Answer: C) Right join Which type of join is used to combine tables without considering any conditions? A) Inner join B) Left join C) Cross join D) Full outer join Answer: C) Cross join Which type of join is used to combine tables based on multiple columns? A) Inner join B) Left join C) Right join D) Composite join Answer: D) Composite join (Note: Composite join is not a standard SQL join, but a term used to describe a join that combines tables based on multiple columns.)
Subjective Short Notes
Midterm & Finalterm Prepration
Past papers included
Download PDF
What is a join operation in a database management system? Answer: A join operation combines rows from two or more tables based on a related column between them. What is an inner join, and what does it return? Answer: An inner join returns only the matched rows from the joined tables. What is a left join, and what does it return? Answer: A left join returns all the rows from the left table and matched rows from the right table. What is a right join, and what does it return? Answer: A right join returns all the rows from the right table and matched rows from the left table. What is a full outer join, and what does it return? Answer: A full outer join returns all the rows from both tables, matching where possible and returning null values where there are no matches. What is a composite join? Answer: A composite join is a join that combines tables based on multiple columns. What is the purpose of an inner join? Answer: The purpose of an inner join is to retrieve only the matched rows from the joined tables. What is the purpose of a left join? Answer: The purpose of a left join is to retrieve all the rows from the left table and matched rows from the right table. What is the purpose of a right join? Answer: The purpose of a right join is to retrieve all the rows from the right table and matched rows from the left table. What is the difference between a left join and a right join? Answer: A left join returns all the rows from the left table and matched rows from the right table, while a right join returns all the rows from the right table and matched rows from the left table.