You are on page 1of 6

DBMS EXPERIMENT NO 05 1

Name: Sahil Satish Pawar


Roll no: 46

DBMS EXPERIMENT NO. 05


Aim : Study and Implement Set Operators in SQL Server (UNION, UNION ALL, INTERSECT, EXCEPT)

Create Table “Test” with columns Name, Matches, Runs, Wickets, Centuries, Batting Avg, Insert
following tuples in the relation test.
(‘Sehwag’, 83,6363,47,19,39)
(‘Gambhir’, 39, 3249, 2,10,38)
(‘Tendulkar’,163, 17439,15,47,55)
(‘Kohli’, 34, 2879, 1, 8, 42)
(‘Dravid’, 135, 11279, 23, 28, 55)
DBMS EXPERIMENT NO 05 2
Name: Sahil Satish Pawar
Roll no: 46

Create Table “ODI” with columns Name, Matches, Runs, Wickets, Centuries, Strike Rate, Insert
following tuples in the this relation.
(‘Sehwag’,179, 6254, 82, 14, 108.14)
(‘Gambhir’, 122, 4234, 4, 8, 84, 47)
(‘Tendulkar’, 442, 13593, 128, 46, 86, 57)
(‘Dravid’, 381, 10768, 17, 21, 78.32)
(‘Raina’, 97, 3572, 39, 5, 82.73)
DBMS EXPERIMENT NO 05 3
Name: Sahil Satish Pawar
Roll no: 46
1) Find names of all players who play in test or odi or both

2) Find names of all players who play in both test and odi.

3) Find names of all players who play in test but not in odi
DBMS EXPERIMENT NO 05 4
Name: Sahil Satish Pawar
Roll no: 46

4) Find names of all players who have scored more than 7000 runs in ODI and at Test at least 10
wickets in Test.
DBMS EXPERIMENT NO 05 5
Name: Sahil Satish Pawar
Roll no: 46
5)Find names of players whose strike rate is more than 80 in odi but batting average is less than 40 in
test.

6)Find names of players who have taken more than 25 wickets in odi matches or less than 10000 runs
in test or both.
DBMS EXPERIMENT NO 05 6
Name: Sahil Satish Pawar
Roll no: 46
7)Find names of players who have scored more than 20 centuries in test but less than 40 centuries in
odi

8)Find names of players who have either played more than 100 test matches or played less than 200
ODI’s or both.

You might also like