Cbse Class 11 Hy Informatics Practice 2017
Cbse Class 11 Hy Informatics Practice 2017
com
http://www.cbseboardonline.com
http://www.cbseboardonline.com
2) Write SQL commands based on the table MOVIE given below:- [10]
MNO TITLE TYPE RATING STAR QTY PRICE ENTRY_DATE
i) Display title, rating and star of type comedy and title starts with C or T
ii) Delete the movie whose quantity is less than 2 and type is scientific
iii) Display title, rating of movie whose price is in range 30 to 50
iv) Display the details of movies whose star is not entered
v) Decrease the price of comedy movies by 10.
vi) Display the details of movies whose rating is G, R and PG
vii) Display MNO, title of all movies with price over 50 in descending order of title
viii) Display title, rating and star of type comedy in order of title and rating
ix) Change the quantity of the movie „Independence Day‟ to 15
x) Show movie number , title and type of all the movies whose price is greater than 50 and
quantity is less than 5
http://www.cbseboardonline.com http://www.a2zSubjects.com
http://www.cbseboardonline.com
3) Write output of the following command based on MOVIE table given above :- [8]
i) Select Concat( title,‟#‟,type,‟ –„,price) , Right( Concat( title,‟#‟,type,‟ –„,price) ,10) from movie
where mno=5;
ii) Select substr(title,4,5) , substr(title, -4,5) from movie where mno=1;
iii) Select Trim(„To‟ from title) from Movie where mno in (3,10);
iv) Select Round(price, 1) from movie where rating =‟PG13‟ ;
v) Select instr(„pen‟, title) from movie where type=‟drama‟ and Qty<5 ;
vi) Select month(entry_date), dayofmonth(entry_date) from movie where type=‟scientific‟ ;
vii) Select dayofyear(entry_date) from movie where star=‟CRUISE‟ ;
viii) Select Length(title) , reverse(type) from movie where mno=9;
4) What will be an output of the following SQL queries: [8]
i) SELECT DAYOFMONTH(CURDATE());
i i ) SELECT LENGTH ( SUBSTRING ( „ X A V I E R - M U S I C F E S T 2 0 1 6 ‟ , 1 1 , 5) ) ;
iii) SELECT MOD(657,9) , POWER(4,2) ;
iv) SELECT SUBSTR( CONCAT(“INTERFACE”,”-ABACUS”), 5);
v) Select UPPER(„Class-11F‟), Right(„Class-11F‟,5) ;
vi) Select Trim(Trailing “ Play-Fest-2016 “) , Trim(„#‟ from „###Play-Fest-2016###‟)
;
vii) Select Length(“Play-Fest-2016”) , Reverse(“Play-Fest-2016”);
viii) Select SUBSTR(“Sony Xperia Z”,-6,8) , SUBSTR(“Sony Xperia Z”,-6,8);
5) Write SQL SELECT statements to do the following: [8]
i) Using the three separate words “Half”, “-Yearly-” and “2016” produce the following output:
“Half-Yearly-2016”
ii) Use the string “11F – F stands for Fabulas” and extract the string “stand”.
iii) Display the length of the string “11F – F stands for Fabulas”.
iv) Display the position of “stand” in “11F – F stands for Fabulas”.
v) Display the name of the day of current month.
vi) Display the date 14 years from now. Label the column “Future.”
vii) Display the number 123.5 as output from the number 123.456
viii) Display the day of week on which your birthday will fall or fell in 2016.
6) Write command to create the following table named STAFF [3]
Column Names Data Types Size
ID Int 5
Name Varchar 20
Department Varchar 15
Gender Char 1
Experience Int 2
http://www.cbseboardonline.com
http://www.cbseboardonline.com
http://www.cbseboardonline.com http://www.a2zSubjects.com