Forum

What is a Subquery?
 
Share:
Notifications
Clear all

What is a Subquery?

2 Posts
1 Users
0 Likes
326 Views
kumar BI
Posts: 12
 kumar BI
Guest
Topic starter
(@kumar BI)
Active Member
Joined: 2 years ago

use of subquery. 

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

Leave a reply

Author Name

Author Email

Title *

 
Preview 0 Revisions Saved
Share: