Database Management System MCQ Quiz Set 4

DBMS MCQ QUIZ
Quiz1234567

Question 1. SELECT emp_name FROM department WHERE dept_nameLIKE ’ _____ Computer Science’; Which one of the following has to be added into the blank to select the dept_name which has Computer Science as its ending string?

(A) %

(B) ||

(C) $

(D) _

View Answer
(A) %

Question 2. ’_ _ _ ’ matches any string of ______ three characters. ’_ _ _ %’ matches any string of at ______ three characters.

(A) All, Exactly

(B) Atleast, Exactly

(C) Exactly, Atleast

(D) Atleast, All

View Answer
(C) Exactly, Atleast

Question 3. SELECT name FROM instructor WHERE dept name = ’Physics’ ORDER BY name; By default, the order by clause lists items in ______ order.

(A)  Same

(B) Descending

(C) Ascending

(D) Any

View Answer
(C) Ascending

Question 4. In SQL the spaces at the end of the string are removed by _______ function.

(A) Upper

(B) Trim

(C) Lower

(D) String

View Answer
(B) Trim

Question 5. _____ operator is used for appending two strings.

(A) &

(B) %

(C) ||

(D) _

View Answer
(C) ||

Question 6. Aggregate functions are functions that take a ___________ as input and return a single value.

(A) Single value

(B) Aggregate value

(C) Aggregate value

(D) Both Collection of values & Single value

View Answer
(A) Single value

Question 7. SELECT __________FROM instructor WHERE dept name= ’Comp. Sci.’; Which of the following should be used to find the mean of the salary ?

(A) Sum(salary)

(B) Avg(salary)

(C) Count(salary)

(D) Mean(salary)

View Answer
(B) Avg(salary)

Question 8. 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) Avg

(C) Primary key

(D) Count

View Answer
(A) Distinct

Question 9. All aggregate functions except _____ ignore null values in their input collection.

(A) Count(attribute)

(B) Avg

(C) Sum

(D) Count(*)

View Answer
(D) Count(*)

Question 10. Which of the following is not an aggregate function?

(A) Min

(B) Avg

(C) With

(D) Sum

View Answer
(C) With

Question 11.Which of these query will display the the table given above ?

(A) Select name

(B) Select name from employee

(C) Select employee

(D) Select employee from name

View Answer
(B) Select name from employee

Question 12. Here which of the following displays the unique values of the column?

SELECT ________ dept_name FROM instructor;

(A) All

(B) From

(C) Distinct

(D) Name

View Answer
(C) Distinct

Question 13. SELECT * FROM employee WHERE salary>10000 AND dept_id=101;

Which of the following fields are displayed as output?

(A) Salary, dept_id

(B) Employee

(C) Salary

(D) All the field of employee relation

View Answer
(D) All the field of employee relation

Question 14. Which of the following statements contains an error?

(A) Select * from emp where empid = 10003;

(B) Select empid from emp where empid = 10006;

(C) Select empid where empid = 1009 and lastname = ‘GELLER’

(D) Select empid from emp;

View Answer
(C) Select empid where empid = 1009 and lastname = ‘GELLER’

Question 15. In the given query which of the keyword has to be inserted?
INSERTINTO employee _____ (1002,Joey,2000);

(A) Table

(B) Field

(C) Relation

(D) Values

View Answer
(D) Values

Question 16. Which is the subset of SQL commands used to manipulate Oracle Database structures, including tables?

(A) Data Manipulation Language(DML)

(B) DML and DDL

(C) Data Definition Language(DDL)

(D) None of the Mentioned

View Answer
(A) Data Manipulation Language(DML)

Question 17.Which of the following is/are the DDL statements?

(A) Create

(B) Alter

(C) Drop

(D) All of the Mentioned

View Answer
(D) All of the Mentioned

Question 18. In SQL, which command(s) is(are) used to change a table’s storage characteristics?

(A) MODIFY TABLE

(B) ALTER TABLE

(C) CHANGE TABLE

(D)  All of the Mentioned

View Answer
(B) ALTER TABLE

Question 19. In SQL, which of the following is not a data definition language commands?

(A) UPDATE

(B) GRANT

(C) REVOKE

(D) RENAME

View Answer
(D) RENAME

Question 20. ________clause is an additional filter that is applied to the result.

(A)  Group-by

(B) Having

(C) Order by

(D) Select

View Answer
(B) Having

Question 21. SQL has how many main commands for DDL:

(A) 1

(B) 2

(C) 3

(D) 4

View Answer
(C) 3

Question 22. Which command defines its columns, integrity constraint in create table:

(A) Drop table command

(B) Create command

(C) Alter table command

(D) All of the Mentioned

View Answer
(B) Create command

Question 23.  Which command is used for removing a table and all its data from the database:

(A) Drop table command

(B) Alter table command

(C) Create command

(D) All of the Mentioned

View Answer
(A) Drop table command

Question 24. Which command allows the removal of all rows from a table but flushes a table more efficiently since no rollback information is retained:

(A) Create command

(B) Drop table command

(C) Alter table command

(D) TRUNCATE command

View Answer
(D) TRUNCATE command

Question 25. The language used application programs to request data from the DBMS is referred to as __________

(A) DDL

(B) Query language

(C) DML

(D) All of the Mentioned

View Answer
(C) DML

Quiz1234567