Consider the table STUDENT given below:
RollNo |
Name |
Class |
DOB |
Gender |
City |
Marks |
1 |
Anand |
XI |
6/6/97 |
M |
Agra |
430 |
2 |
Chetan |
XII |
7/5/94 |
M |
Mumbai |
460 |
3 |
Geet |
XI |
6/5/97 |
F |
Agra |
470 |
4 |
Preeti |
XII |
8/8/95 |
F |
Mumbai |
492 |
5 |
Saniyal |
XII |
8/10/95 |
M |
Delhi |
360 |
6 |
Maakhiy |
XI |
12/12/94 |
F |
Dubai |
256 |
7 |
Neha |
X |
8/12/95 |
F |
Moscow |
324 |
8 |
Nishant |
X |
12/6/95 |
M |
Moscow |
429 |
1. State the command that will give the output as :
Name |
Anand
Chetan
Geet
Preeti |
i. select name from student where class=’XI’ and class=’XII’;
ii. select name from student where not class=’XI’ and class=’XII’;
iii. select name from student where city=”Agra” OR city=”Mumbai”;
iv. select name from student where city IN(“Agra”, “Mumbai”);
Choose the correct option:
a. Both (i) and (ii).
b. Both (iii) and (iv).
c. Any of the options (i), (ii) and (iv)
d. Only (iii)
(2). What will be the output of the following command?
Select * from student where gender =”F” order by marks;+
(a)
Rollno |
Name |
Class |
DOB |
Gender |
City |
Marks |
4
3
7
6 |
Preeti
Geet
Neha
Maakhiy |
XII
XI
X
XI |
8/8/95
6/5/97
8/12/95
12/12/94 |
F
F
F
F |
Mumbai
Agra
Moscow
Dubai |
492
470
324
256 |
(b)
Rollno |
Name |
Class |
DOB |
Gender |
City |
Marks |
6
7
3
4 |
Maakhiy
Neha
Geet
Preeti |
XI
X
XI
XII |
12/12/94
8/12/95
6/5/97
8/8/95 |
F
F
F
F |
Dubai
Moscow
Agra
Mumbai |
256
324
470
492 |
(c)
Gender |
Marks |
F
F
F
F |
256
324
470
492 |
(d)
Gender |
Marks |
F
F
F
F |
492
470
324
256 |