DBMS 11.pdf - Ymyxkh
DBMS 11.pdf - Ymyxkh
inner query
seleit a from
students
where s id 101
student table
s id s.name age martis
1 A 22 87 a
a B 4
70
3 C 23 62
4 D 24 89 c
5 E 21 75
6 F 21 55
7 h 23 92
saltit A
foom students
where marks 775
I
the marks of the student whose
a find
skid is I 1
select marks
from students
where sb id L
student table st 52
student table
s.ids.name age man
s ids.name age
22 a many
Is an t 22
in
C 23
an 3 C 23
EE 5 E 21 75
4 I 23
t a is I
4 23 92
join students 52
on s 2 marks 52 marks and 52.5 id L
selelt
from students
where marks select argemark
from students
employees table
7 90k null
8 D ITR 15
10 9
E 20K
11 f 80k may
13 Cr 50k 6
6 ad 3011 7
9 bb nov 10
IT is 70k 6
when a manager
is left the company their information
select e id
from employee
where salary 30,000
break fill 9 14
instrator table
of deaf id 105
ALL
select i_name
from instructor
where salary ALL selelt salary
from instructor
where dept id 105
525K 5011,701
select i_name
from instructor
where salary select max salad
from instmitor
of deaf id 105
select i_name
from instructor
where salary Any selest salary
from instructor
where dept id 105
525K 5011,701
correlated query
with
if any query is related column
of other query
spelitis departmen
from instructors a
where salary select avg salary
from instructor
where department id a department id
depi id 110
Seleit countta
from instructor
where dep id 120
I find the number of instructor of all
countta dirt id
selelt dept id
from instructor
inctuiter
group by dept id
seiest dept id a
from departments d
I