What is a SubQuery?

chinmay.sahoo

New member
• Subquery or Inner query or Nested query is a query in a query.

• A Subquery is usually added in the WHERE Clause of the sql statement.

• Used when we know how to search a value using SELECT statement, but don’t know the xact value.

• Subqueries are an alternate way of returning data from multiple tables.

• Subqueries can be used with the following sql statements along with the comparison operators like =, <, >, >=, <= etc. SELECT, INSERT, UPDATE, DELETE
 
• Subquery or Inner query or Nested query is a query in a query.

• A Subquery is usually added in the WHERE Clause of the sql statement.

• Used when we know how to search a value using SELECT statement, but don’t know the xact value.

• Subqueries are an alternate way of returning data from multiple tables.

• Subqueries can be used with the following sql statements along with the comparison operators like =, <, >, >=, <= etc. SELECT, INSERT, UPDATE, DELETE

Good job, man.
Keep sharing :)
 
1 subquery is simply a SELECT statement within another one SELECT statement, with the aim of returning the results for external use SELECT statements. Subquery may lie in the SELECT clause, FROM (called inline view), WHERE or HAVING.
 
A subquery is a query embedded within the WHERE clause of another query to further restrict data returned by the query. It is a query within another query, also known as a nested query. It is used to return data that will be used in the main query as a condition to further restrict the data to be retrieved. Subqueries are used with the SELECT, INSERT, UPDATE, and DELETE statements.
 
A subquery is a query that is nested inside a SELECT, INSERT, UPDATE, or DELETE statement, or inside another subquery. A subquery can be used anywhere an expression is allowed.A subquery is also called an inner query or inner select, while the statement containing a subquery is also called an outer query or outer select.
 
Back
Top