Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

sub query

Former Member
3 REPLIES 3
Read only

Former Member
0 Likes
375

Sub query is query inside a query

Eg

select country from dbtab1

where country not in (select country from dbtab2).

Reward if useful

Read only

Former Member
0 Likes
375

Hi,

A subquery is a special SELECT statement containing a subquery within particular conditions of the WHERE or HAVING clauses. You cannot use them in the ONcondition of the FROM clause. Their syntax is:

( SELECT result

FROM source

[WHERE condition]

[GROUP BY fields]

[HAVING cond] )

In simple language,

Query inside Query.

Output of inner query will be given to the outer query.

Reward if useful!

Read only

Former Member
0 Likes
375

THANK U.