A directory of Objective Type Questions covering all the Computer Science subjects.

1.
The SQL database language includes statements for:
a. Database definition.
b. Database manipulation.
c. Database control.
d. All of the above.
View Answer Report Discuss Too Difficult! Search Google
Answer: (d).All of the above.

2.
A command to remove a relation from an SQL database
a. Delete table table name
b. Drop table table name
c. Erase table table name
d. Alter table table name
View Answer Report Discuss Too Difficult! Search Google
Answer: (b).Drop table table name

3.
Which SQL Query is use to remove a table and all its data from the database?
a. Create Table
b. Alter Table
c. Drop Table
d. None of these
View Answer Report Discuss Too Difficult! Search Google
Answer: (c).Drop Table

4.
A type of query that is placed within a WHERE or HAVING clause of another query is called
a. Super query
b. Sub query
c. Master query
d. Multi-query
View Answer Report Discuss Too Difficult! Search Google
Answer: (b).Sub query

5.
Aggregate functions are functions that take a ___________ as input and return a single value.
a. Collection of values
b. Single value
c. Aggregate value
d. Both a & b
View Answer Report Discuss Too Difficult! Search Google
Answer: (a).Collection of values

6.
Select __________ from instructor where dept name= ’Comp. Sci.’;

Which of the following should be used to find the mean of the salary ?
a. Mean(salary)
b. Avg(salary)
c. Sum(salary)
d. Count(salary)
View Answer Report Discuss Too Difficult! Search Google
Answer: (b).Avg(salary)

7.
All aggregate functions except _____ ignore null values in their input collection.
a. Count(attribute)
b. Count(*)
c. Avg
d. Sum
View Answer Report Discuss Too Difficult! Search Google
Answer: (b).Count(*)

8.
A Boolean data type that can take values true, false, and________ .
a. 1
b. 0
c. Null
d. Unknown
View Answer Report Discuss Too Difficult! Search Google
Answer: (d).Unknown

9.
Select count (____ ID)

from teaches
where semester = ’Spring’ and year = 2010;
If we do want to eliminate duplicates, we use the keyword ______in the aggregate expression.
a. Distinct
b. Count
c. Avg
d. Primary key
View Answer Report Discuss Too Difficult! Search Google
Answer: (a).Distinct

10.
The ____ connective tests for set membership, where the set is a collection of values produced by a select clause. The ____ connective tests for the absence of set membership.
a. Or, in
b. Not in, in
c. In, not in
d. In, or
View Answer Report Discuss Too Difficult! Search Google
Answer: (c).In, not in

Page 1 of 8

copyright 2016 computer science bitsCompscibits.com