Que: 1. The SQL database language includes statements for: |
a. Database definition. |
b. Database manipulation. |
c. Database control. |
d. All of the above. |
Que: 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 |
Que: 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 |
Que: 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 |
Que: 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 |
Que: 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) |
Que: 7. All aggregate functions except _____ ignore null values in their input collection. |
a. Count(attribute) |
b. Count(*) |
c. Avg |
d. Sum |
Que: 8. A Boolean data type that can take values true, false, and________ . |
a. 1 |
b. 0 |
c. Null |
d. Unknown |
Que: 9. Select count (____ ID)from teacheswhere 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 |
Que: 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 |