WorksheetsDBS Lab 3 Quiz
Total questions: 8
Worksheet time: 6mins
The default ordering followed in the ORDER BY clause is?
Ascending
Descending
What will be the order followed for salary, name and dept_name respectively in the following case:
select * from instructor order by dept_name, salary, name DESC;
Desc, desc, desc
Asc, desc, desc
Asc, desc, Asc
Asc, Asc, desc
The “AS” keyword is optional while specifying an alias for a field name in a select statement
True
False
what is the correct order of evaluation of the following where clause:
Where not a or b and c
(not a) or (b and c)
Not (a or (b and c))
((not a) or b) and c
All are the same for SQL
Say you have a relation r1(course_name, course_id, room_alloted). The room_alloted may have null values (if no room is allotted to a course). You are interested in all those classes that DONOT occur in a particular set of rooms (say A).
Is the following SQL query correct for that?
Select * from r1 where room_alloted not in A;
YES
NO
Which of the following is a correct way to find all those students whose names begin with a vowel?
Select * from student where NAME in (“a%”,”e%”,”i%”,”o%”,”u%”);
Select * from student where NAME like (“a%”,”e%”,”i%”,”o%”,”u%”);
select * from student where NAME like "a%" or NAME like "e%" or NAME like "i%" or NAME like "o%" or NAME like "U%";
All
What will be the output on applying "SELECT AVG(DISCO) FROM T1" if T1 is as given:
(30+40+45+30+40+20)/6
(30+40+45+30+40+0+0+0+0+0+20)/11
(30+40+45+30+40+0+0+0+0+0+null+20)/12
