

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


Assignment No. 03 Solution File Database Management Systems-CS
Total Marks: 10
Documentary Table Doc_No Title Ranking YearReleased 1 Hoop Dreams A 1994 2 The Thin Blue Line B 2000 3 Surprise Me A 2004 4 Trouble the Water C 2008 5 Dark Days B 2000 6 Paris In Burning B 1991
You are required to write an SQL statement using SELECT operator, which will give the following resultant table. Title YearReleased The Thin Blue Line 2000 Dark Days 2000 Paris In Burning 1991
ALL SQL Statements…
Create table Documentary (
Doc_No int,
Title Varchar(50),
Ranking varchar(2),
YearReleased smalldatetime );
Select * from Documentary;
Insert into documentary (Doc_No,Title,Ranking,YearReleased) values (1,'Hoop Dreams','A','1994');
Insert into documentary (Doc_No,Title,Ranking,YearReleased) values (2,'The Thin Blue Line','B','2000');
Insert into documentary (Doc_No,Title,Ranking,YearReleased) values (3,'Surprise Me ','A','2004');
Insert into documentary (Doc_No,Title,Ranking,YearReleased) values (4,'Trouble the Water ','C','2008');
Insert into documentary (Doc_No,Title,Ranking,YearReleased) values (5,'Dark Days','B','2000');
Insert into documentary (Doc_No,Title,Ranking,YearReleased) values (6,'Paris In Burning','B','1991');
Insert into documentary (Doc_No,Title,Ranking,YearReleased) values (7,'Man on Wire','A','2008');
Select * from Documentary;
Select Title, YearReleased from documentary where Ranking = 'B';
Note: This Query will written to find the resultant table.