{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# exp6 - Rishi 10000 2 Thakur 5000 3 Paradox 99000 4 R 70000...

This preview shows pages 1–2. Sign up to view the full content.

Aim : To study Nested Subqueries , Set Membership & Set Comparisons RISHI AGARWAL ROLL NO 02 SE CMPN A create table rishi(Sr_no int,C_Name varchar(30),Amt int); insert into rishi values(1,'Rishi',10000); insert into rishi values(2,'Thakur',5000); insert into rishi values(3,'Paradox',99000); create table rishi1(Sr_no1 int,C_Name1 varchar(30),Amt1 int); insert into rishi1 values(1,'Rishi',10000); insert into rishi1 values(2,'Thakur',5000); insert into rishi1 values(3,'Paradox',99000); insert into rishi1 values(4,'R',70000); select * from rishi; SR_NO C_NAME AMT ---------- ------------------------------ ---------- 1 Rishi 10000 2 Thakur 5000 3 Paradox 99000 select * from rishi1; SR_NO1 C_NAME1 AMT1 ---------- ------------------------------ ---------- 1

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Rishi 10000 2 Thakur 5000 3 Paradox 99000 4 R 70000 select distinct C_Name1 from rishi1 where C_Name1 in(select C_NAme from rishi); C_NAME1-------------Paradox Rishi Thakur select distinct C_Name1 from rishi1 where C_Name1 not in(select C_NAme from rishi); C_NAME1-----------R select distinct * from rishi as T,rishi1 as S where T.Amt=S.Amt1; 1 Rishi 10000 1 Rishi 10000 2 Thakur 5000 2 Thakur 5000 3 Paradox 99000 3 Paradox 99000 select distinct * from rishi as T,rishi1 as S where T.Amt<=S.Amt1; 1 Rishi 10000 1 Rishi 10000 1 Rishi 10000 3 Paradox 99000 1 Rishi 10000 4 R 70000 2 Thakur 5000 1 Rishi 10000 2 Thakur 5000 2 Thakur 5000 2 Thakur 5000 3 Paradox 99000 2 Thakur 5000 4 R 70000 3 Paradox 99000 3 Paradox 99000...
View Full Document

{[ snackBarMessage ]}