Docsity

Documentary Table-Database Management System-Assignment Solution, Exercises of Database Management Systems (DBMS)

Toggle sidebar
bg1
Assignment No. 03
Solution File
Database Management Systems-CS403
Total Marks: 10
1(a). Consider the table below: Marks: 5
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
Solution can be found on next page…
docsity.com
pf3

Partial preview of the text

Download Documentary Table-Database Management System-Assignment Solution and more Exercises Database Management Systems (DBMS) in PDF only on Docsity!

Assignment No. 03 Solution File Database Management Systems-CS

Total Marks: 10

1(a). Consider the table below: Marks: 5

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

Solution can be found on next page…

Solution(a):

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.