Sub Query
Sub Query
select * from student where dno = (select dno from faculty where faculty_id= 'IT001');
select * from student where dno = (select dno from faculty where faculty_id= 'EC001' or faculty_id
='IT001');
select * from student where dno in (select dno from faculty where faculty_id= 'EC001' or faculty_id
='IT001');
select * from faculty where salary > any (select salary from faculty where Faculty_name ='Harshitha'
or faculty_name = 'Raja');
select * from faculty where salary > all (select salary from faculty where Faculty_name ='Harshitha'
or faculty_name = 'Raja');
select count(*) from student where marks in (select s.marks from student s ,student d where
s.marks = d.marks and s.regno <> d.regno);