Question 143Asked in DSSSB TGT Computer Science, 25 Jun 2023, Shift 3 (4:30 PM)
What is the difference between a join and a subque1Y in a database?
AA join is used to retrieve data from a single table based on a condition, while a subquery is used to combine data from multiple tables based on a common column.
BA join is used to sort data in a table, while a subquery is used to filter data in a table.
CA join is used to combine data from multiple tables based on a common column, while a subquery is used to retrieve data from a single table based on a condition.
DThere is no difference between a join and a subquery.
Show answerHide answer
Correct answer: (C) A join is used to combine data from multiple tables based on a common column, while a subquery is used to retrieve data from a single table based on a condition.
Explanation
A join combines rows from several tables on a related (common) column. A subquery is a query nested inside another query, often used to filter on a condition.
From DSSSB TGT Computer Science PYQ, 25 Jun 2023, Shift 3 (4:30 PM)