21 Nested Querypdf Lyst1722265628958
21 Nested Querypdf Lyst1722265628958
Nested Query
-
Nested Query
another.
months
-
Batch ,
(batchid course id start date
,
-
----------- ,
time
,
days ,
sizes
Student-Batch (id
-
, Vollno bathid, joindate)
,
Populate names and email ids from
Student table where the roll no
of
student exists in student-batch
table where the batchid =
WHERE Vallno IN
WHERE rollno In
(1 , 2
, 3) ;
vollnoWHERE batchid
from
=
Student-Batch
1)
Two Types of Nested Queries
Independent Nested
·
Quely
Corelated Nested
·
Query
Independent Nested Query
-
An outer quely won't be executed
until its inner query completes its
execution
.
-
various operations can be used in
independent nested queries :
EN ,
NOT IN ALL ,
ANY
,
SELECT column name
FROM tablename
C
SELECT column-name
C ;
SELECT name email Student
From
,
WHERE rollno IN
WHERE Salary 7
department-e2
.
department
D ;