Forum

What is a Subquery?
 
Notifications
Clear all

What is a Subquery?


kumar BI
Posts: 12
 kumar BI
Topic starter
(@kumar BI)
Joined: 1 year ago

use of subquery. 

Topic Tags
1 Reply
Ram DBA
Posts: 47
 Ram DBA
(@Ram DBA)
Joined: 1 year ago

A Subquery is a SQL query within another query. It is a subset of a Select statement whose return values are used in filtering the conditions of the main query.

Here is the simple subquery for your better understanding. 

SELECT ProductName
FROM Product
WHERE Id IN (SELECT ProductId
FROM OrderItem
WHERE Quantity > 50)

 

Reply
Share: