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?

  1. 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.
  2. BA join is used to sort data in a table, while a subquery is used to filter data in a table.
  3. 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.
  4. 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)

This is question 143 of DSSSB TGT Computer Science PYQ, 25 Jun 2023, Shift 3 (4:30 PM). See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.