Forum

What is a Subquery?
 
Share:
Notifications
Clear all

What is a Subquery?


Posts: 12
Guest
Topic starter
(@kumar BI)
Active Member
Joined: 4 years ago

use of subquery. 

Topic Tags
1 Reply
Posts: 47
Guest
(@Ram DBA)
Eminent Member
Joined: 4 years 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

Self Learning Video Tutorials - Software Course

Leave a reply

Author Name

Author Email

Title *

 
Preview 0 Revisions Saved
Share: